diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-03-12 21:10:39 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-03-12 21:16:23 +0400 |
commit | 95e0e68dff5e24c3b514f3392f8c17f8bf4f6fef (patch) | |
tree | 3294ac4f7d7c0a17d44681bf10c681763daa4b63 /src/client/ui/ui.c | |
parent | 3a7f7590c7005094e3e48d42ee92b39ad091028c (diff) |
Fix menu transparency.
Allow full-screen menus to be transparent. Only draw top menu layer
regardless of transparency.
Diffstat (limited to 'src/client/ui/ui.c')
-rw-r--r-- | src/client/ui/ui.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/client/ui/ui.c b/src/client/ui/ui.c index 89c3fd9..8ff73fb 100644 --- a/src/client/ui/ui.c +++ b/src/client/ui/ui.c @@ -85,7 +85,6 @@ void UI_PushMenu(menuFrameWork_t *menu) uis.entersound = qtrue; } - uis.transparent |= menu->transparent; uis.activeMenu = menu; UI_DoHitTest(); @@ -154,7 +153,6 @@ UI_PopMenu void UI_PopMenu(void) { menuFrameWork_t *menu; - int i; if (uis.menuDepth < 1) Com_Error(ERR_FATAL, "UI_PopMenu: depth < 1"); @@ -172,14 +170,6 @@ void UI_PopMenu(void) uis.activeMenu = uis.layers[uis.menuDepth - 1]; uis.mouseTracker = NULL; - uis.transparent = qfalse; - for (i = uis.menuDepth - 1; i >= 0; i--) { - if (uis.layers[i]->transparent) { - uis.transparent = qtrue; - break; - } - } - UI_DoHitTest(); } @@ -198,7 +188,7 @@ qboolean UI_IsTransparent(void) return qtrue; } - return uis.transparent; + return uis.activeMenu->transparent; } menuFrameWork_t *UI_FindMenu(const char *name) @@ -210,6 +200,7 @@ menuFrameWork_t *UI_FindMenu(const char *name) return menu; } } + return NULL; } @@ -451,7 +442,7 @@ void UI_Draw(int realtime) R_SetScale(&uis.scale); #endif - if (!uis.transparent) { + if (1) { // draw top menu if (uis.activeMenu->draw) { uis.activeMenu->draw(uis.activeMenu); |