mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-27 06:22:27 +00:00
Changed ESCAPE key handling a bit
This commit is contained in:
parent
d2ad17af41
commit
f8847e0f37
2 changed files with 9 additions and 9 deletions
|
@ -8777,11 +8777,7 @@ void _UI_KeyEvent(int key, qboolean down)
|
|||
menuDef_t *menu = Menu_GetFocused();
|
||||
|
||||
if (menu) {
|
||||
if (key == K_ESCAPE && down && !Menus_AnyFullScreenVisible()) {
|
||||
Menus_CloseAll();
|
||||
} else {
|
||||
Menu_HandleKey(menu, key, down);
|
||||
}
|
||||
Menu_HandleKey(menu, key, down);
|
||||
} else {
|
||||
trap_Key_SetCatcher(trap_Key_GetCatcher() & ~KEYCATCH_UI);
|
||||
trap_Key_ClearStates();
|
||||
|
|
|
@ -4230,11 +4230,15 @@ void Menu_HandleKey(menuDef_t * menu, int key, qboolean down)
|
|||
break;
|
||||
|
||||
case K_ESCAPE:
|
||||
if (!g_waitingForKey && menu->onESC) {
|
||||
itemDef_t it;
|
||||
if (!g_waitingForKey) {
|
||||
if (menu->onESC) {
|
||||
itemDef_t it;
|
||||
|
||||
it.parent = menu;
|
||||
Item_RunScript(&it, menu->onESC);
|
||||
it.parent = menu;
|
||||
Item_RunScript(&it, menu->onESC);
|
||||
} else if (openMenuCount > 0) {
|
||||
Menus_Close(menuStack[openMenuCount]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case K_TAB:
|
||||
|
|
Loading…
Reference in a new issue