mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-25 17:25:10 +03:00
Popups refactoring
This commit is contained in:
parent
8376e1b16b
commit
7d4adc1afe
8 changed files with 117 additions and 63 deletions
|
@ -438,24 +438,20 @@ void guiMain(event_t evt)
|
|||
menuEvent = 0;
|
||||
}
|
||||
|
||||
handleGui(isEventCaughtByPopup() ? 0 : evt);
|
||||
|
||||
if (warningText) {
|
||||
// show warning on top of the normal menus
|
||||
handleGui(0); // suppress events, they are handled by the warning
|
||||
DISPLAY_WARNING(evt);
|
||||
}
|
||||
else if (popupMenuItemsCount > 0) {
|
||||
// popup menu is active display it on top of normal menus
|
||||
handleGui(0); // suppress events, they are handled by the popup
|
||||
// show popup menu on top of the normal menus
|
||||
const char * result = runPopupMenu(evt);
|
||||
if (result) {
|
||||
TRACE("popupMenuHandler(%s)", result);
|
||||
popupMenuHandler(result);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// normal menus
|
||||
handleGui(evt);
|
||||
}
|
||||
|
||||
lcdRefresh();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue