From dcc1aa0ccfef2ff8d14e96c61102214c5536ae4d Mon Sep 17 00:00:00 2001 From: Christopher Schwarz Date: Sat, 22 Jan 2011 15:33:51 +0000 Subject: * (bug 3013) Add gametype column to server browser (Rezyn, with thanks to Jackmcbarn, Risujin) --- assets/ui/joinserver.menu | 76 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 61 insertions(+), 15 deletions(-) (limited to 'assets') diff --git a/assets/ui/joinserver.menu b/assets/ui/joinserver.menu index 8a240091..975126f0 100644 --- a/assets/ui/joinserver.menu +++ b/assets/ui/joinserver.menu @@ -33,7 +33,8 @@ #define BOTBUTT_W (BOT_W/5) #define BOTBUTT_H BOT_H -#define SERVER_C 0.6 +#define SERVER_C 0.45 +#define GAME_C 0.15 #define MAP_C 0.2 #define PLAYERS_C 0.1 #define PING_C 0.1 @@ -272,6 +273,50 @@ decoration } + itemDef + { + name game + group grpTabs + type ITEM_TYPE_BUTTON + text "Game Type" + textscale .33 + style WINDOW_STYLE_FILLED + rect (LIST_X+(SERVER_C*LIST_W)) LIST_Y (GAME_C*LIST_W) HEADFOOT_H + textalign ALIGN_LEFT + textvalign VALIGN_CENTER + textalignx LIST_TOFF + border WINDOW_BORDER_FULL + bordercolor 0.5 0.5 0.5 1 + forecolor 1 1 1 1 + backcolor 0 0 0 0 + outlinecolor 0.1 0.1 0.1 0.5 + visible MENU_TRUE + action + { + play "sound/misc/menu1.wav"; + uiScript ServerSort 1; + + setitemcolor grpColumn backcolor 0 0 0 0; + setitemcolor grpTabs backcolor 0 0 0 0; + setitemcolor game backcolor 0.3 1 1 0.3; + setitemcolor gameColumn backcolor 0.2 0.6 0.6 0.1; + } + } + + itemDef + { + name gameColumn + group grpColumn + rect (LIST_X+(SERVER_C*LIST_W)) (LIST_Y+HEADFOOT_H) (GAME_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + style WINDOW_STYLE_FILLED + border WINDOW_BORDER_FULL + backcolor 0 0 0 0 + bordersize 1 + bordercolor .5 .5 .5 1 + visible MENU_TRUE + decoration + } + itemDef { name map @@ -280,7 +325,7 @@ text "Map Name" textscale .33 style WINDOW_STYLE_FILLED - rect (LIST_X+(SERVER_C*LIST_W)) LIST_Y (MAP_C*LIST_W) HEADFOOT_H + rect (LIST_X+((SERVER_C+GAME_C)*LIST_W)) LIST_Y (MAP_C*LIST_W) HEADFOOT_H textalign ALIGN_LEFT textvalign VALIGN_CENTER textalignx LIST_TOFF @@ -293,7 +338,7 @@ action { play "sound/misc/menu1.wav"; - uiScript ServerSort 1; + uiScript ServerSort 2; setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor grpTabs backcolor 0 0 0 0; @@ -306,7 +351,7 @@ { name mapColumn group grpColumn - rect (LIST_X+(SERVER_C*LIST_W)) (LIST_Y+HEADFOOT_H) (MAP_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + rect (LIST_X+((SERVER_C+GAME_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (MAP_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) style WINDOW_STYLE_FILLED border WINDOW_BORDER_FULL backcolor 0 0 0 0 @@ -324,7 +369,7 @@ type ITEM_TYPE_BUTTON textscale .33 style WINDOW_STYLE_FILLED - rect (LIST_X+((SERVER_C+MAP_C)*LIST_W)) LIST_Y (PLAYERS_C*LIST_W) HEADFOOT_H + rect (LIST_X+((SERVER_C+GAME_C+MAP_C)*LIST_W)) LIST_Y (PLAYERS_C*LIST_W) HEADFOOT_H textalign ALIGN_LEFT textvalign VALIGN_CENTER textalignx LIST_TOFF @@ -337,7 +382,7 @@ action { play "sound/misc/menu1.wav"; - uiScript ServerSort 2; + uiScript ServerSort 3; setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor grpTabs backcolor 0 0 0 0; @@ -350,7 +395,7 @@ { name playerColumn group grpColumn - rect (LIST_X+((SERVER_C+MAP_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PLAYERS_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + rect (LIST_X+((SERVER_C+GAME_C+MAP_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PLAYERS_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) style WINDOW_STYLE_FILLED border WINDOW_BORDER_FULL backcolor 0 0 0 0 @@ -368,7 +413,7 @@ type ITEM_TYPE_BUTTON textscale .33 style WINDOW_STYLE_FILLED - rect (LIST_X+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) LIST_Y (PING_C*LIST_W) HEADFOOT_H + rect (LIST_X+((SERVER_C+GAME_C+MAP_C+PLAYERS_C)*LIST_W)) LIST_Y (PING_C*LIST_W) HEADFOOT_H textalign ALIGN_LEFT textvalign VALIGN_CENTER textalignx LIST_TOFF @@ -381,7 +426,7 @@ action { play "sound/misc/menu1.wav"; - uiScript ServerSort 3; + uiScript ServerSort 4; setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor grpTabs backcolor 0 0 0 0; @@ -394,7 +439,7 @@ { name pingColumn group grpColumn - rect (LIST_X+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PING_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) + rect (LIST_X+((SERVER_C+GAME_C+MAP_C+PLAYERS_C)*LIST_W)) (LIST_Y+HEADFOOT_H) (PING_C*LIST_W) (LIST_H-(2*HEADFOOT_H)) style WINDOW_STYLE_FILLED border WINDOW_BORDER_FULL backcolor 0.2 0.6 0.6 0.1 @@ -423,11 +468,12 @@ backcolor 0.2 0.2 0.2 1 outlinecolor 0.1 0.3 0.3 0.4 visible MENU_TRUE - columns 4 - LIST_TOFF ((SERVER_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT - (LIST_TOFF+((SERVER_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT - (LIST_TOFF+((SERVER_C+MAP_C)*LIST_W)) ((PLAYERS_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT - (LIST_TOFF+((SERVER_C+MAP_C+PLAYERS_C)*LIST_W)) ((PING_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT + columns 5 + LIST_TOFF ((SERVER_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT + (LIST_TOFF+((SERVER_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT + (LIST_TOFF+((SERVER_C+GAME_C)*LIST_W)) ((MAP_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT + (LIST_TOFF+((SERVER_C+GAME_C+MAP_C)*LIST_W)) ((PLAYERS_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT + (LIST_TOFF+((SERVER_C+GAME_C+MAP_C+PLAYERS_C)*LIST_W)) ((PING_C*LIST_W)-(3*LIST_TOFF)) ALIGN_LEFT doubleClick { uiScript JoinServer } } -- cgit