summaryrefslogtreecommitdiff
path: root/src/client/ui/script.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2013-03-12 21:10:39 +0400
committerAndrey Nazarov <skuller@skuller.net>2013-03-12 21:16:23 +0400
commit95e0e68dff5e24c3b514f3392f8c17f8bf4f6fef (patch)
tree3294ac4f7d7c0a17d44681bf10c681763daa4b63 /src/client/ui/script.c
parent3a7f7590c7005094e3e48d42ee92b39ad091028c (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/script.c')
-rw-r--r--src/client/ui/script.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/ui/script.c b/src/client/ui/script.c
index 4176ee6..0e7fdc4 100644
--- a/src/client/ui/script.c
+++ b/src/client/ui/script.c
@@ -464,9 +464,7 @@ static void Parse_Background(menuFrameWork_t *menu)
if (SCR_ParseColor(s, &menu->color)) {
menu->image = 0;
- if (menu->color.u8[3] != 255) {
- menu->transparent = qtrue;
- }
+ menu->transparent = menu->color.u8[3] != 255;
} else {
menu->image = R_RegisterPic(s);
menu->transparent = R_GetPicSize(NULL, NULL, menu->image);
@@ -632,6 +630,7 @@ static qboolean Parse_File(const char *path, int depth)
menu->free = Menu_Free;
menu->image = uis.backgroundHandle;
menu->color.u32 = uis.color.background.u32;
+ menu->transparent = uis.transparent;
} else if (!strcmp(cmd, "include")) {
char *s = Cmd_Argv(1);
if (!*s) {
@@ -650,8 +649,10 @@ static qboolean Parse_File(const char *path, int depth)
if (SCR_ParseColor(s, &uis.color.background)) {
uis.backgroundHandle = 0;
+ uis.transparent = uis.color.background.u8[3] != 255;
} else {
uis.backgroundHandle = R_RegisterPic(s);
+ uis.transparent = R_GetPicSize(NULL, NULL, uis.backgroundHandle);
}
} else if (!strcmp(cmd, "font")) {
uis.fontHandle = R_RegisterFont(Cmd_Argv(1));