diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-01-31 20:16:41 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-01-31 21:24:15 +0400 |
commit | 77c6dcb03ea682f8d009d7605e66032daae1851c (patch) | |
tree | 2c10f2786bba4e2134a1dda8856b19b065831a88 /src | |
parent | 727e7b1d39d854ed8e4164c8dc143167f3c9a848 (diff) |
Extend layout syntax to support color.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/screen.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client/screen.c b/src/client/screen.c index 1117e28..f85a1bf 100644 --- a/src/client/screen.c +++ b/src/client/screen.c @@ -1901,7 +1901,21 @@ static void SCR_ExecuteLayoutString(const char *s) } continue; } + + if (!strcmp(token, "color")) { + color_t color; + + token = COM_Parse(&s); + if (SCR_ParseColor(token, &color)) { + color.u8[3] *= scr_alpha->value; + R_SetColor(color.u32); + } + continue; + } } + + R_ClearColor(); + R_SetAlpha(scr_alpha->value); } //============================================================================= |