PXX2 refactoring + Popups refactoring
This commit is contained in:
+1
-11
@@ -400,8 +400,6 @@ void handleGui(event_t event) {
|
||||
}
|
||||
}
|
||||
|
||||
bool inPopupMenu = false;
|
||||
|
||||
void guiMain(event_t evt)
|
||||
{
|
||||
#if defined(LUA)
|
||||
@@ -446,22 +444,14 @@ void guiMain(event_t 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
|
||||
if (!inPopupMenu) {
|
||||
TRACE("Popup Menu started");
|
||||
inPopupMenu = true;
|
||||
}
|
||||
const char * result = runPopupMenu(evt);
|
||||
if (popupMenuItemsCount == 0) {
|
||||
if (result) {
|
||||
TRACE("popupMenuHandler(%s)", result);
|
||||
popupMenuHandler(result);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// normal menus
|
||||
if (inPopupMenu) {
|
||||
TRACE("Popup Menu ended");
|
||||
inPopupMenu = false;
|
||||
}
|
||||
handleGui(evt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user