summaryrefslogtreecommitdiff
path: root/src/client/ui/menu.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2013-06-19 17:36:33 +0400
committerAndrey Nazarov <skuller@skuller.net>2013-06-19 17:36:33 +0400
commit9d709fb9ccd4ca54be38d9b909c4517cbc0a6ebf (patch)
tree196d4e6425ecc130bdca9212276f41b6b73c94bf /src/client/ui/menu.c
parentb532eefb36cbecffa9cecbc2e14a183790ebd69b (diff)
Add basic support for coloring server browser entries.
Add ‘ui_colorservers’ variable, grays out password protected and anticheat enforced servers.
Diffstat (limited to 'src/client/ui/menu.c')
-rw-r--r--src/client/ui/menu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/ui/menu.c b/src/client/ui/menu.c
index ce45b25..642bbaf 100644
--- a/src/client/ui/menu.c
+++ b/src/client/ui/menu.c
@@ -1397,6 +1397,10 @@ static void MenuList_Draw(menuList_t *l)
// draw contents
s = (char *)l->items[i] + l->extrasize;
+ if (l->mlFlags & MLF_COLOR) {
+ R_SetColor(*((uint32_t *)(s - 4)));
+ }
+
xx = x;
for (j = 0; j < l->numcolumns; j++) {
if (!*s) {
@@ -1412,6 +1416,10 @@ static void MenuList_Draw(menuList_t *l)
yy += MLIST_SPACING;
}
+
+ if (l->mlFlags & MLF_COLOR) {
+ R_SetColor(U32_WHITE);
+ }
}
void MenuList_Sort(menuList_t *l, int offset, int (*cmpfunc)(const void *, const void *))