Double-space menu option for iggy

This commit is contained in:
Stefan `Sec` Zehl 2011-08-04 21:41:51 +02:00
parent 50b89a076d
commit 639fe12fb6
2 changed files with 8 additions and 1 deletions

View File

@ -181,6 +181,7 @@ struct MENU {
#define MENU_TIMEOUT (1<<0)
#define MENU_JUSTONCE (1<<1)
#define MENU_BIG (1<<2)
extern uint8_t menuflags;

View File

@ -22,6 +22,10 @@ void handleMenu(const struct MENU *the_menu) {
for (numentries = 0; the_menu->entries[numentries].text != NULL ; numentries++);
visible_lines = lcdGetVisibleLines()-1; // subtract title line
if(menuflags&MENU_BIG)
visible_lines/=2;
#ifdef SAFETY
if (visible_lines < 2) return;
#endif
@ -32,6 +36,8 @@ void handleMenu(const struct MENU *the_menu) {
lcdPrintln(the_menu->title);
for (uint8_t i = current_offset; i < (visible_lines + current_offset) && i < numentries; i++) {
if(menuflags&MENU_BIG)
lcdNl();
if (i == menuselection) {
lcdPrint("*");
}