Fixed bug popping menus
This commit is contained in:
parent
f0aacc16df
commit
a98b776c7b
2 changed files with 12 additions and 10 deletions
src/ui
|
@ -1991,18 +1991,18 @@ local void PopMenu(void)
|
|||
Menuitem* mi;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CurrentMenu->nitems; ++i) {
|
||||
mi = CurrentMenu->items + i;
|
||||
if (mi->exitfunc) {
|
||||
(*mi->exitfunc)(mi); // action/destructor
|
||||
if (Menus && Menus->Menu == CurrentMenu) {
|
||||
for (i = 0; i < CurrentMenu->nitems; ++i) {
|
||||
mi = CurrentMenu->items + i;
|
||||
if (mi->exitfunc) {
|
||||
(*mi->exitfunc)(mi); // action/destructor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MenuButtonUnderCursor = -1;
|
||||
MenuButtonCurSel = -1;
|
||||
CurrentMenu = NULL;
|
||||
MenuButtonUnderCursor = -1;
|
||||
MenuButtonCurSel = -1;
|
||||
CurrentMenu = NULL;
|
||||
|
||||
if (Menus) {
|
||||
MenuButtonCurSel = Menus->CurSel;
|
||||
menu = Menus;
|
||||
Menus = Menus->Next;
|
||||
|
@ -2010,6 +2010,8 @@ local void PopMenu(void)
|
|||
if (Menus) {
|
||||
CurrentMenu = Menus->Menu;
|
||||
}
|
||||
} else {
|
||||
CurrentMenu = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1621,7 +1621,7 @@ local void SoundOptionsExit(Menuitem *mi __attribute__((unused)))
|
|||
*/
|
||||
local void GlobalOptionsMenu(void)
|
||||
{
|
||||
ProcessMenu("menu-global-options", 0);
|
||||
ProcessMenu("menu-global-options", 1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue