diff options
-rw-r--r-- | src/cgame/cg_consolecmds.c | 29 | ||||
-rw-r--r-- | src/client/cl_main.c | 4 | ||||
-rw-r--r-- | src/client/client.h | 2 | ||||
-rw-r--r-- | src/qcommon/q_shared.h | 7 | ||||
-rw-r--r-- | src/ui/ui_main.c | 4 | ||||
-rw-r--r-- | ui/joinserver.menu | 4 | ||||
-rw-r--r-- | ui/main.menu | 26 | ||||
-rw-r--r-- | ui/menus.txt | 2 | ||||
-rw-r--r-- | ui/options.menu | 287 | ||||
-rw-r--r-- | ui/punkbuster.menu | 292 | ||||
-rw-r--r-- | ui/teamscore.menu | 4 |
11 files changed, 354 insertions, 307 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index fcbdd72d..cbd1aeb6 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -100,8 +100,35 @@ qboolean CG_RequestScores( void ) return qfalse; } +extern menuDef_t *menuScoreboard; + +static void CG_scrollScoresDown_f( void ) +{ + if( menuScoreboard && cg.scoreBoardShowing ) + { + Menu_ScrollFeeder( menuScoreboard, FEEDER_ALIENTEAM_LIST, qtrue ); + Menu_ScrollFeeder( menuScoreboard, FEEDER_HUMANTEAM_LIST, qtrue ); + } +} + + +static void CG_scrollScoresUp_f( void ) +{ + if( menuScoreboard && cg.scoreBoardShowing ) + { + Menu_ScrollFeeder( menuScoreboard, FEEDER_ALIENTEAM_LIST, qfalse ); + Menu_ScrollFeeder( menuScoreboard, FEEDER_HUMANTEAM_LIST, qfalse ); + } +} + static void CG_ScoresDown_f( void ) { + if( !cg.showScores ) + { + Menu_SetFeederSelection( menuScoreboard, FEEDER_ALIENTEAM_LIST, 0, NULL ); + Menu_SetFeederSelection( menuScoreboard, FEEDER_HUMANTEAM_LIST, 0, NULL ); + } + if( CG_RequestScores( ) ) { // leave the current scores up if they were already @@ -179,6 +206,8 @@ static consoleCommand_t commands[ ] = { "viewpos", CG_Viewpos_f }, { "+scores", CG_ScoresDown_f }, { "-scores", CG_ScoresUp_f }, + { "scoresUp", CG_scrollScoresUp_f }, + { "scoresDown", CG_scrollScoresDown_f }, { "+zoom", CG_ZoomDown_f }, { "-zoom", CG_ZoomUp_f }, { "sizeup", CG_SizeUp_f }, diff --git a/src/client/cl_main.c b/src/client/cl_main.c index 78ff243b..f326632d 100644 --- a/src/client/cl_main.c +++ b/src/client/cl_main.c @@ -2417,7 +2417,7 @@ void CL_Init( void ) { // userinfo Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE ); - Cvar_Get ("rate", "3000", CVAR_USERINFO | CVAR_ARCHIVE ); + Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("snaps", "20", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE ); Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE ); @@ -2538,7 +2538,7 @@ static void CL_SetServerInfo(serverInfo_t *server, const char *info, int ping) { if (server) { if (info) { server->clients = atoi(Info_ValueForKey(info, "clients")); - Q_strncpyz(server->hostName,Info_ValueForKey(info, "hostname"), MAX_NAME_LENGTH); + Q_strncpyz(server->hostName,Info_ValueForKey(info, "hostname"), MAX_HOSTNAME_LENGTH ); Q_strncpyz(server->mapName, Info_ValueForKey(info, "mapname"), MAX_NAME_LENGTH); server->maxClients = atoi(Info_ValueForKey(info, "sv_maxclients")); Q_strncpyz(server->game,Info_ValueForKey(info, "game"), MAX_NAME_LENGTH); diff --git a/src/client/client.h b/src/client/client.h index f0aa6e8e..a7db023f 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -228,7 +228,7 @@ typedef struct { typedef struct { netadr_t adr; - char hostName[MAX_NAME_LENGTH]; + char hostName[MAX_HOSTNAME_LENGTH]; char mapName[MAX_NAME_LENGTH]; char game[MAX_NAME_LENGTH]; int netType; diff --git a/src/qcommon/q_shared.h b/src/qcommon/q_shared.h index 0059cdfa..64019b58 100644 --- a/src/qcommon/q_shared.h +++ b/src/qcommon/q_shared.h @@ -162,7 +162,8 @@ typedef int clipHandle_t; #define MAX_OSPATH 256 // max length of a filesystem pathname #endif -#define MAX_NAME_LENGTH 32 // max length of a client name +#define MAX_NAME_LENGTH 32 // max length of a client name +#define MAX_HOSTNAME_LENGTH 80 // max length of a host name #define MAX_SAY_TEXT 150 @@ -1247,9 +1248,9 @@ typedef struct qtime_s { // server browser sources // TTimo: AS_MPLAYER is no longer used -#define AS_LOCAL 0 +#define AS_GLOBAL 0 #define AS_MPLAYER 1 -#define AS_GLOBAL 2 +#define AS_LOCAL 2 #define AS_FAVORITES 3 diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c index 30b4c9fe..cde1c73a 100644 --- a/src/ui/ui_main.c +++ b/src/ui/ui_main.c @@ -56,9 +56,9 @@ static const int numSkillLevels = sizeof(skillLevels) / sizeof(const char*); static const char *netSources[] = { - "Local", - "Mplayer", "Internet", + "Mplayer", + "LAN", "Favorites" }; static const int numNetSources = sizeof(netSources) / sizeof(const char*); diff --git a/ui/joinserver.menu b/ui/joinserver.menu index 38ee1b1e..11dc2f57 100644 --- a/ui/joinserver.menu +++ b/ui/joinserver.menu @@ -294,7 +294,7 @@ outlinecolor 0.1 0.1 0.1 0.5 visible 1 columns 4 - 2 40 40 ITEM_ALIGN_LEFT + 2 40 80 ITEM_ALIGN_LEFT 375 40 20 ITEM_ALIGN_LEFT 500 5 10 ITEM_ALIGN_LEFT 560 20 20 ITEM_ALIGN_LEFT @@ -411,7 +411,7 @@ action { play "sound/misc/menu1.wav"; - uiScript ServerSort 4; + uiScript ServerSort 3; setitemcolor grpColumn backcolor 0 0 0 0; setitemcolor pingColumn backcolor 0.3 1 1 0.5 diff --git a/ui/main.menu b/ui/main.menu index dbb5fda6..488fe694 100644 --- a/ui/main.menu +++ b/ui/main.menu @@ -82,7 +82,7 @@ itemDef { name mainmenu - text "Mods" + text "Options" type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL @@ -97,6 +97,28 @@ action { play "sound/misc/menu1.wav"; + open simple_options + } + } + + itemDef + { + name mainmenu + text "Mods" + type ITEM_TYPE_BUTTON + style WINDOW_STYLE_EMPTY + textstyle ITEM_TEXTSTYLE_NORMAL + textscale .416 + rect 472 60 128 20 + textalignx 128 + textaligny 20 + textalign ITEM_ALIGN_RIGHT + backcolor 0 0 0 0 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; open mod } } @@ -108,7 +130,7 @@ type ITEM_TYPE_BUTTON style WINDOW_STYLE_EMPTY textstyle ITEM_TEXTSTYLE_NORMAL - rect 472 60 128 20 + rect 472 80 128 20 textalignx 128 textaligny 20 textscale .416 diff --git a/ui/menus.txt b/ui/menus.txt index cc6f73c7..753fb953 100644 --- a/ui/menus.txt +++ b/ui/menus.txt @@ -3,7 +3,7 @@ { loadMenu { "ui/main.menu" } loadMenu { "ui/joinserver.menu" } - loadMenu { "ui/punkbuster.menu" } + loadMenu { "ui/options.menu" } loadMenu { "ui/createserver.menu" } loadMenu { "ui/mod.menu" } loadMenu { "ui/credit.menu" } diff --git a/ui/options.menu b/ui/options.menu new file mode 100644 index 00000000..c6cc01c1 --- /dev/null +++ b/ui/options.menu @@ -0,0 +1,287 @@ +#include "ui/menudef.h" + +{ + \\ FRONT END OPTIONS BOX \\ + + menuDef + { + name "simple_options" + visible 0 + fullscreen 0 + rect 200 80 240 320 + focusColor 1 .75 0 1 + style 1 + border 1 + popup + onEsc + { + close simple_options; + open main + } + + itemDef + { + name window + rect 0 0 240 320 + style WINDOW_STYLE_FILLED + backcolor 0 0 0 1 + visible 1 + decoration + + border WINDOW_BORDER_FULL + borderSize 1.0 + borderColor 0.5 0.5 0.5 1 + } + + + + itemDef + { + type ITEM_TYPE_EDITFIELD + style 0 + text "Name:" + cvar "name" + maxchars 26 + rect 50 20 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef + { + type ITEM_TYPE_MULTI + text "Video Quality:" + cvar "ui_glCustom" + cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 } + rect 50 45 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + uiScript update "ui_glCustom" + } + } + + itemDef + { + type ITEM_TYPE_MULTI + text "Video Mode:" + cvar "r_mode" + cvarFloatList { "320x240" 0 "400x300" 1 "512x384" 2 "640x480" 3 + "800x600" 4 "960x720" 5 "1024x768" 6 "1152x864" 7 + "1280x1024" 8 "1600x1200" 9 "2048x1536" 10 "856x480 wide screen" 11 } + rect 50 60 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + uiScript glCustom + } + } + + itemDef + { + type ITEM_TYPE_SLIDER + text "Video Brightness:" + cvarfloat "r_gamma" 1 .5 2 + rect 50 75 192 20 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + + + itemDef + { + type ITEM_TYPE_SLIDER + text "Effects Volume:" + cvarfloat "s_volume" 0.7 0 1 + rect 50 110 192 20 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef + { + type ITEM_TYPE_SLIDER + text "Music Volume:" + cvarfloat "s_musicvolume" 0.25 0 1 + rect 50 130 192 20 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef + { + type ITEM_TYPE_YESNO + text "OpenAL Sound:" + cvar "s_useOpenAL" + rect 50 145 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + } + } + + + + itemDef + { + type ITEM_TYPE_SLIDER + text "Mouse Sensitivity:" + cvarfloat "sensitivity" 5 1 30 + rect 50 175 192 20 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + } + + itemDef + { + type ITEM_TYPE_YESNO + text "Invert Mouse:" + cvar "ui_mousePitch" + rect 50 190 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + uiScript update ui_mousePitch + } + } + + + + itemDef + { + type ITEM_TYPE_MULTI + text "Network Connection:" + cvar "rate" + cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSl" 25000 } + rect 50 220 192 20 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + } + } + + itemDef + { + type ITEM_TYPE_YESNO + text "Allow Auto Download:" + cvar "cl_allowDownload" + rect 50 235 192 15 + textalign ITEM_ALIGN_RIGHT + textalignx 64 + textaligny 12 + textscale .25 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + } + } + + + itemDef + { + text "APPLY" + type ITEM_TYPE_BUTTON + textscale .25 + style WINDOW_STYLE_EMPTY + rect 95 255 30 20 + textalign ITEM_ALIGN_CENTER + textalignx 15 + textaligny 15 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + exec "snd_restart" // includes vid_restart + } + } + + itemDef + { + text "OK" + type ITEM_TYPE_BUTTON + textscale .25 + style WINDOW_STYLE_EMPTY + rect 125 255 20 20 + textalign ITEM_ALIGN_CENTER + textalignx 10 + textaligny 15 + forecolor 1 1 1 1 + visible 1 + action + { + play "sound/misc/menu1.wav"; + close simple_options; + } + } + + + itemDef + { + text "For further options please use the in-game options menu" + style WINDOW_STYLE_EMPTY + textstyle ITEM_TEXTSTYLE_NORMAL + textscale .25 + rect 0 300 240 40 + textalign ITEM_ALIGN_CENTER + textaligny 0 + textalignx 120 + forecolor 1 1 1 1 + visible 1 + decoration + } + } +} diff --git a/ui/punkbuster.menu b/ui/punkbuster.menu deleted file mode 100644 index acd36949..00000000 --- a/ui/punkbuster.menu +++ /dev/null @@ -1,292 +0,0 @@ -#include "ui/menudef.h" - -{ - - // PB enable ---------------- - - menuDef - { - name "pbenable_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 - focusColor 1 .75 0 1 - style 1 - border 1 - popup - onESC - { - close pbenable_popmenu; - open joinserver - } - - itemDef - { - name window - rect 47 47 144 144 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 1 - visible 1 - decoration - - border WINDOW_BORDER_FULL - borderSize 1.0 - borderColor 0.5 0.5 0.5 1 - } - - itemDef - { - name confirm - text "Enable Punkbuster?" - style 0 - textscale .25 - textstyle 3 - rect 0 85 110 20 - textalign 1 - textalignx 120 - textaligny 15 - decoration - forecolor 1 1 1 1 - visible 1 - } - - // yes/no button - - itemDef - { - name yes - text "YES" - type 1 - textscale .25 - rect 75 140 30 26 - textalign 1 - textalignx 18 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - uiScript setPbClStatus 1; - close pbenable_popmenu; - open joinserver - } - } - - itemDef - { - name no - text "NO" - type 1 - textscale .25 - rect 128 140 30 26 - textalign 1 - textalignx 18 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu4.wav"; - close pbenable_popmenu; - open joinserver - } - } - } - - // PB disable --------------- - - menuDef - { - name "pbdisable_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 - focusColor 1 .75 0 1 - style 1 - border 1 - popup - onESC - { - close pbdisable_popmenu; - open joinserver - } - - itemDef - { - name window - rect 47 47 144 144 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 1 - visible 1 - decoration - - border WINDOW_BORDER_FULL - borderSize 1.0 - borderColor 0.5 0.5 0.5 1 - } - - itemDef - { - name confirm - text "Disable Punkbuster?" - style 0 - textscale .25 - textstyle 3 - rect 0 85 110 20 - textalign 1 - textalignx 120 - textaligny 15 - decoration - forecolor 1 1 1 1 - visible 1 - } - - // yes/no button - - itemDef - { - name yes - text "YES" - type 1 - textscale .25 - rect 75 140 30 26 - textalign 1 - textalignx 18 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - close pbdisable_popmenu; - open pbmsg_popmenu - } - } - - itemDef - { - name no - text "NO" - type 1 - textscale .25 - rect 128 140 30 26 - textalign 1 - textalignx 18 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu4.wav"; - close pbdisable_popmenu; - open joinserver - } - } - } - - // disable msg -------------- - - menuDef - { - name "pbmsg_popmenu" - visible 0 - fullscreen 0 - rect 204 122 235 235 - focusColor 1 .75 0 1 - style 1 - border 1 - popup - onESC - { - play "sound/misc/menu4.wav"; - close pbmsg_popmenu; - open joinserver - } - - itemDef - { - name window - rect 47 47 144 144 - style WINDOW_STYLE_FILLED - backcolor 0 0 0 1 - visible 1 - decoration - - border WINDOW_BORDER_FULL - borderSize 1.0 - borderColor 0.5 0.5 0.5 1 - } - - itemDef - { - name confirm - text "PunkBuster will be disabled" - style 0 - textscale .25 - textstyle 3 - rect 0 85 110 20 - textalign 1 - textalignx 120 - textaligny 15 - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name confirm - text "next time you start" - style 0 - textscale .25 - textstyle 3 - rect 0 100 110 20 - textalign 1 - textalignx 120 - textaligny 15 - decoration - forecolor 1 1 1 1 - visible 1 - } - - itemDef - { - name confirm - text "Tremulous" - style 0 - textscale .25 - textstyle 3 - rect 0 115 110 20 - textalign 1 - textalignx 120 - textaligny 15 - decoration - forecolor 1 1 1 1 - visible 1 - } - - // ok button - - itemDef - { - name yes - text "OK" - type 1 - textscale .25 - rect 103 158 30 26 - textalign 1 - textalignx 18 - textaligny 20 - forecolor 1 1 1 1 - visible 1 - action - { - play "sound/misc/menu1.wav"; - uiScript setPbClStatus 0; - close pbmsg_popmenu; - open joinserver - } - } - } -} diff --git a/ui/teamscore.menu b/ui/teamscore.menu index 0c0da7e4..2c8a7dd7 100644 --- a/ui/teamscore.menu +++ b/ui/teamscore.menu @@ -181,7 +181,7 @@ itemDef { name leftlist - rect 14 142 306 222 + rect 14 136 306 222 forecolor .75 .75 .75 1 visible 1 type ITEM_TYPE_LISTBOX @@ -204,7 +204,7 @@ itemDef { name rightlist - rect 320 142 306 222 + rect 320 136 306 222 forecolor 1 1 1 1 visible 1 type ITEM_TYPE_LISTBOX |