Double-space menu option for iggy
This commit is contained in:
parent
50b89a076d
commit
639fe12fb6
|
@ -181,6 +181,7 @@ struct MENU {
|
||||||
|
|
||||||
#define MENU_TIMEOUT (1<<0)
|
#define MENU_TIMEOUT (1<<0)
|
||||||
#define MENU_JUSTONCE (1<<1)
|
#define MENU_JUSTONCE (1<<1)
|
||||||
|
#define MENU_BIG (1<<2)
|
||||||
extern uint8_t menuflags;
|
extern uint8_t menuflags;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
for (numentries = 0; the_menu->entries[numentries].text != NULL ; numentries++);
|
for (numentries = 0; the_menu->entries[numentries].text != NULL ; numentries++);
|
||||||
|
|
||||||
visible_lines = lcdGetVisibleLines()-1; // subtract title line
|
visible_lines = lcdGetVisibleLines()-1; // subtract title line
|
||||||
|
|
||||||
|
if(menuflags&MENU_BIG)
|
||||||
|
visible_lines/=2;
|
||||||
|
|
||||||
#ifdef SAFETY
|
#ifdef SAFETY
|
||||||
if (visible_lines < 2) return;
|
if (visible_lines < 2) return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,6 +36,8 @@ void handleMenu(const struct MENU *the_menu) {
|
||||||
lcdPrintln(the_menu->title);
|
lcdPrintln(the_menu->title);
|
||||||
|
|
||||||
for (uint8_t i = current_offset; i < (visible_lines + current_offset) && i < numentries; i++) {
|
for (uint8_t i = current_offset; i < (visible_lines + current_offset) && i < numentries; i++) {
|
||||||
|
if(menuflags&MENU_BIG)
|
||||||
|
lcdNl();
|
||||||
if (i == menuselection) {
|
if (i == menuselection) {
|
||||||
lcdPrint("*");
|
lcdPrint("*");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue