From 557ff6a9818d5383c9b544ad45612b850334e1e0 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 23 Apr 2021 23:55:16 -0400 Subject: lua print_button script also allow splash_scroller to be used as static text display Change-Id: Idc8c9e60ada920e2d1abd5301b59bd235e21a1c2 --- apps/plugins/lua/rockaux.c | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'apps/plugins/lua/rockaux.c') diff --git a/apps/plugins/lua/rockaux.c b/apps/plugins/lua/rockaux.c index 25bace3451..73fe458889 100644 --- a/apps/plugins/lua/rockaux.c +++ b/apps/plugins/lua/rockaux.c @@ -133,28 +133,32 @@ int splash_scroller(int timeout, const char* str) } rb->lcd_update(); - - action = rb->get_action(CONTEXT_STD, timeout); - switch(action) + if (timeout >= TIMEOUT_BLOCK) { - case ACTION_STD_OK: - case ACTION_STD_CANCEL: - cycles--; - /* Fall Through */ - case ACTION_NONE: - cycles--; - break; - case ACTION_STD_PREV: - timeout = TIMEOUT_BLOCK; /* disable timeout */ - if(firstline > 0) - firstline--; - break; - case ACTION_STD_NEXT: - timeout = TIMEOUT_BLOCK; /* disable timeout */ - if (linesdisp == max_lines) - firstline++; - break; + action = rb->get_action(CONTEXT_STD, timeout); + switch(action) + { + case ACTION_STD_OK: + case ACTION_STD_CANCEL: + cycles--; + /* Fall Through */ + case ACTION_NONE: + cycles--; + break; + case ACTION_STD_PREV: + timeout = TIMEOUT_BLOCK; /* disable timeout */ + if(firstline > 0) + firstline--; + break; + case ACTION_STD_NEXT: + timeout = TIMEOUT_BLOCK; /* disable timeout */ + if (linesdisp == max_lines) + firstline++; + break; + } } + else + break; } return action; } -- cgit v1.2.3