Cosmetics

This commit is contained in:
Bertrand Songis
2019-03-09 11:23:16 +01:00
parent 2ce2f082db
commit aee6daf0d0
10 changed files with 47 additions and 16 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ void editName(coord_t x, coord_t y, char * name, uint8_t size, event_t event, ui
v = zchar2char(v);
}
name[editNameCursorPos] = v;
storageDirty(menuVerticalPositions[0] == 0 ? EE_MODEL : EE_GENERAL);
storageDirty(isModelMenuDisplayed() ? EE_MODEL : EE_GENERAL);
}
lcdDrawSizedText(x, y, name, size, flags);
+10 -3
View File
@@ -48,13 +48,20 @@ extern uint8_t menuVerticalPositions[4];
extern uint8_t menuLevel;
extern event_t menuEvent;
/// goto given Menu, but substitute current menu in menuStack
void chainMenu(MenuHandlerFunc newMenu);
/// goto given Menu, store current menu in menuStack
void pushMenu(MenuHandlerFunc newMenu);
/// return to last menu in menuStack
void popMenu();
inline bool isRadioMenuDisplayed()
{
return menuVerticalPositions[0] == 1;
}
inline bool isModelMenuDisplayed()
{
return menuVerticalPositions[0] == 0;
}
enum MenuIcons {
ICON_OPENTX,
ICON_RADIO,