1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

[Horus] Navigation fixes

This commit is contained in:
Andre Bernet 2016-04-02 10:38:34 +04:00
parent 9615c98103
commit 788bdfbb09
3 changed files with 9 additions and 7 deletions

View file

@ -505,7 +505,7 @@ bool menuModelTelemetry(evt_t event)
case ITEM_TELEMETRY_IGNORE_SENSOR_INSTANCE: case ITEM_TELEMETRY_IGNORE_SENSOR_INSTANCE:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_IGNORE_INSTANCE); lcdDrawText(MENUS_MARGIN_LEFT, y, STR_IGNORE_INSTANCE);
editCheckBox(g_model.ignoreSensorIds, TELEM_COL2, y, attr, event); g_model.ignoreSensorIds = editCheckBox(g_model.ignoreSensorIds, TELEM_COL2, y, attr, event);
break; break;
case ITEM_TELEMETRY_RSSI_LABEL: case ITEM_TELEMETRY_RSSI_LABEL:

View file

@ -165,12 +165,12 @@ bool menuMainView(evt_t event)
pushMenu(menuTabScreensSetup[1]); pushMenu(menuTabScreensSetup[1]);
return false; return false;
case EVT_KEY_BREAK(KEY_PGDN): case EVT_KEY_FIRST(KEY_PGDN):
storageDirty(EE_GENERAL); storageDirty(EE_GENERAL);
g_eeGeneral.view = circularIncDec(g_eeGeneral.view, +1, 0, getMainViewsCount()-1); g_eeGeneral.view = circularIncDec(g_eeGeneral.view, +1, 0, getMainViewsCount()-1);
break; break;
case EVT_KEY_BREAK(KEY_PGUP): case EVT_KEY_FIRST(KEY_PGUP):
killEvents(event); killEvents(event);
storageDirty(EE_GENERAL); storageDirty(EE_GENERAL);
g_eeGeneral.view = circularIncDec(g_eeGeneral.view, -1, 0, getMainViewsCount()-1); g_eeGeneral.view = circularIncDec(g_eeGeneral.view, -1, 0, getMainViewsCount()-1);
@ -193,6 +193,7 @@ bool menuMainView(evt_t event)
return true; return true;
} }
#if 0
bool menuMainViewChannelsMonitor(evt_t event) bool menuMainViewChannelsMonitor(evt_t event)
{ {
switch (event) { switch (event) {
@ -204,3 +205,4 @@ bool menuMainViewChannelsMonitor(evt_t event)
return menuChannelsView(event); return menuChannelsView(event);
} }
#endif

View file

@ -100,7 +100,7 @@ bool menuTextView(evt_t event)
readTextFile(lines_count); readTextFile(lines_count);
break; break;
case EVT_KEY_FIRST(KEY_UP): case EVT_ROTARY_LEFT:
if (menuVerticalOffset == 0) if (menuVerticalOffset == 0)
break; break;
else else
@ -108,7 +108,7 @@ bool menuTextView(evt_t event)
readTextFile(lines_count); readTextFile(lines_count);
break; break;
case EVT_KEY_FIRST(KEY_DOWN): case EVT_ROTARY_RIGHT:
if (menuVerticalOffset+NUM_BODY_LINES >= lines_count) if (menuVerticalOffset+NUM_BODY_LINES >= lines_count)
break; break;
else else
@ -116,7 +116,7 @@ bool menuTextView(evt_t event)
readTextFile(lines_count); readTextFile(lines_count);
break; break;
case EVT_KEY_BREAK(KEY_EXIT): case EVT_KEY_FIRST(KEY_EXIT):
popMenu(); popMenu();
break; break;
} }
@ -131,7 +131,7 @@ bool menuTextView(evt_t event)
#endif #endif
// lcd_putsCenter(MENU_FOOTER_TOP, title, HEADER_COLOR); // lcd_putsCenter(MENU_FOOTER_TOP, title, HEADER_COLOR);
drawVerticalScrollbar(LCD_W-5, 30, MENU_FOOTER_TOP-34, menuVerticalOffset, lines_count, NUM_BODY_LINES); drawVerticalScrollbar(LCD_W-5, 50, 195, menuVerticalOffset, lines_count, NUM_BODY_LINES);
return true; return true;
} }