mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-01-22 09:31:11 +00:00
_prev menu fixes
This commit is contained in:
parent
4125076cdf
commit
a785e1e55a
2 changed files with 10 additions and 6 deletions
|
@ -1634,10 +1634,14 @@ void Menus_Close(menuDef_t *menu)
|
|||
if (!menu)
|
||||
return;
|
||||
|
||||
prevMenu = NULL;
|
||||
for (i=0; i<openMenuCount; i++)
|
||||
{
|
||||
if (menuStack[i] == menu)
|
||||
{
|
||||
if (i > 0)
|
||||
prevMenu = menuStack[i-1];
|
||||
|
||||
openMenuCount--;
|
||||
while (i < openMenuCount)
|
||||
{
|
||||
|
@ -4236,8 +4240,8 @@ void Menu_HandleKey(menuDef_t * menu, int key, qboolean down)
|
|||
|
||||
it.parent = menu;
|
||||
Item_RunScript(&it, menu->onESC);
|
||||
} else if (openMenuCount > 0) {
|
||||
Menus_Close(menuStack[openMenuCount]);
|
||||
} else {
|
||||
Menus_Close(menu);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -6488,10 +6492,10 @@ menuDef_t *Menus_ActivateByName(const char *p, qboolean special)
|
|||
if (menuStack[j] == m) {
|
||||
alreadyActive = qtrue;
|
||||
//move to the top of the stack
|
||||
if (j != openMenuCount - 1) {
|
||||
menuStack[j] = menuStack[openMenuCount-1];
|
||||
menuStack[openMenuCount-1] = m;
|
||||
for (; j<openMenuCount-1; ++j) {
|
||||
menuStack[j] = menuStack[j+1];
|
||||
}
|
||||
menuStack[openMenuCount-1] = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
//Makro - changed to 192
|
||||
#define MAX_MENUITEMS 192
|
||||
#define MAX_COLOR_RANGES 10
|
||||
#define MAX_OPEN_MENUS 16
|
||||
#define MAX_OPEN_MENUS 32
|
||||
|
||||
#define WINDOW_MOUSEOVER 0x00000001 // mouse is over it, non exclusive
|
||||
#define WINDOW_HASFOCUS 0x00000002 // has cursor focus, exclusive
|
||||
|
|
Loading…
Reference in a new issue