option added for menus to show "JUSTONCE"
This commit is contained in:
parent
9add0367fe
commit
13f5444745
|
@ -180,6 +180,7 @@ struct MENU {
|
|||
};
|
||||
|
||||
#define MENU_TIMEOUT (1<<0)
|
||||
#define MENU_JUSTONCE (1<<1)
|
||||
extern uint8_t menuflags;
|
||||
|
||||
|
||||
|
|
|
@ -68,6 +68,10 @@ void handleMenu(const struct MENU *the_menu) {
|
|||
case BTN_RIGHT:
|
||||
if (the_menu->entries[menuselection].callback!=NULL)
|
||||
the_menu->entries[menuselection].callback();
|
||||
|
||||
if (menuflags&MENU_JUSTONCE)
|
||||
return;
|
||||
|
||||
break;
|
||||
case BTN_ENTER:
|
||||
lcdClear();
|
||||
|
@ -77,6 +81,10 @@ void handleMenu(const struct MENU *the_menu) {
|
|||
if (the_menu->entries[menuselection].callback!=NULL)
|
||||
the_menu->entries[menuselection].callback();
|
||||
lcdRefresh();
|
||||
|
||||
if (menuflags&MENU_JUSTONCE)
|
||||
return;
|
||||
|
||||
getInputWait();
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue