g_RQ3_teamXname cvars are now used in the join menu

This commit is contained in:
Andrei Drexler 2002-11-09 13:06:10 +00:00
parent 5e5201b437
commit 1d5008740f
6 changed files with 65 additions and 34 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.9 2002/11/09 13:05:02 makro
// g_RQ3_teamXname cvars are now used in the join menu
//
// Revision 1.8 2002/08/30 15:09:43 makro // Revision 1.8 2002/08/30 15:09:43 makro
// MM UI // MM UI
// //
@ -231,6 +234,10 @@
#define UI_RQ3_RADIOPRESET9 159 #define UI_RQ3_RADIOPRESET9 159
#define UI_RQ3_RADIOPRESET10 160 #define UI_RQ3_RADIOPRESET10 160
//Makro - join menu items
#define UI_RQ3_JOINTEAM1 161
#define UI_RQ3_JOINTEAM2 162
#define UI_OWNERDRAW_BASE 200 #define UI_OWNERDRAW_BASE 200
#define UI_HANDICAP 200 #define UI_HANDICAP 200
#define UI_EFFECTS 201 #define UI_EFFECTS 201

View file

@ -3,38 +3,22 @@
<pre> <pre>
<h1>Build Log</h1> <h1>Build Log</h1>
<h3> <h3>
--------------------Configuration: cgame - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
cgamex86.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: game - Win32 Release--------------------
</h3>
<h3>Command Lines</h3>
<h3>Results</h3>
qagamex86.dll - 0 error(s), 0 warning(s)
<h3>
--------------------Configuration: ui - Win32 Release TA-------------------- --------------------Configuration: ui - Win32 Release TA--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP48E.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPA6.tmp" with contents
[ [
/nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c /nologo /G6 /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "UI_EXPORTS" /Fp"Release_TA/ta_ui.pch" /YX /Fo"Release_TA/" /Fd"Release_TA/" /FD /c
"C:\Games\Quake3\rq3source\reaction\game\bg_misc.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_atoms.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_atoms.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_gameinfo.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_gameinfo.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_players.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_players.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_shared.c"
"C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c" "C:\Games\Quake3\rq3source\reaction\ta_ui\ui_syscalls.c"
] ]
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP48E.tmp" Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPA6.tmp"
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP48F.tmp" with contents Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPA7.tmp" with contents
[ [
/nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib" /nologo /base:"0x40000000" /dll /incremental:no /pdb:"Release_TA/uix86.pdb" /map:"Release_TA/uix86.map" /machine:I386 /def:".\ui.def" /out:"../Release/uix86.dll" /implib:"Release_TA/uix86.lib"
.\Release_TA\bg_misc.obj .\Release_TA\bg_misc.obj
@ -48,14 +32,16 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP48F.tmp" with conte
.\Release_TA\ui_syscalls.obj .\Release_TA\ui_syscalls.obj
.\Release_TA\ui_util.obj .\Release_TA\ui_util.obj
] ]
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP48F.tmp" Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPA7.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
bg_misc.c
ui_atoms.c ui_atoms.c
ui_gameinfo.c ui_gameinfo.c
ui_main.c ui_main.c
C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c(4821) : warning C4101: 'game' : unreferenced local variable C:\Games\Quake3\rq3source\reaction\ta_ui\ui_main.c(4861) : warning C4101: 'game' : unreferenced local variable
ui_players.c ui_players.c
ui_shared.c
ui_syscalls.c ui_syscalls.c
Linking... Linking...
Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp Creating library Release_TA/uix86.lib and object Release_TA/uix86.exp

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.56 2002/11/09 13:05:02 makro
// g_RQ3_teamXname cvars are now used in the join menu
//
// Revision 1.55 2002/10/31 01:10:07 jbravo // Revision 1.55 2002/10/31 01:10:07 jbravo
// Bumped the version to 2.3 // Bumped the version to 2.3
// //
@ -1428,6 +1431,14 @@ static void UI_RQ3_DrawPreset(rectDef_t * rect, float scale, vec4_t color, int n
Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle); Text_Paint(rect->x, rect->y, scale, color, text, 0, 0, textStyle);
} }
static char team1Name[128], team2Name[128];
//Makro - added for the join menu
static void UI_RQ3_DrawJoinTeam(rectDef_t * rect, float scale, vec4_t color, int num, int textStyle)
{
//char *text = va("Team %i", num);
Text_Paint(rect->x, rect->y, scale, color, (num == 1) ? team1Name : team2Name, 0, 0, textStyle);
}
static void UI_DrawTeamMember(rectDef_t * rect, float scale, vec4_t color, qboolean blue, int num, int textStyle) static void UI_DrawTeamMember(rectDef_t * rect, float scale, vec4_t color, qboolean blue, int num, int textStyle)
{ {
// 0 - None // 0 - None
@ -2360,21 +2371,26 @@ void UI_BuildIngameServerInfoList()
AddIngameLine("Round time limit", (limit !=0 ) ? va("%i", limit) : "None"); AddIngameLine("Round time limit", (limit !=0 ) ? va("%i", limit) : "None");
AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model"))); AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model")));
AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model"))); AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model")));
break;
} }
case GT_TEAM: case GT_TEAM:
{
AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model"))); AddIngameLine("Team 1", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team1Name"), Info_ValueForKey(info, "g_RQ3_team1model")));
AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model"))); AddIngameLine("Team 2", va("%s (%s)", Info_ValueForKey(info, "g_RQ3_team2Name"), Info_ValueForKey(info, "g_RQ3_team2model")));
if (gametype == GT_TEAM) AddIngameLine("TeamDM Mode", (tdmMode != 0) ? "Classic" : "TP style");
AddIngameLine("TeamDM Mode", (tdmMode != 0) ? "Classic" : "TP style"); break;
}
case GT_CTF: case GT_CTF:
{ {
limit = atoi(Info_ValueForKey(info, "capturelimit")); limit = atoi(Info_ValueForKey(info, "capturelimit"));
AddIngameLine("Capture limit", (limit !=0 ) ? va("%i", limit) : "None"); AddIngameLine("Capture limit", (limit !=0 ) ? va("%i", limit) : "None");
break;
} }
default: default:
{ {
limit = atoi(Info_ValueForKey(info, "fraglimit")); limit = atoi(Info_ValueForKey(info, "fraglimit"));
AddIngameLine("Frag limit", (limit !=0 ) ? va("%i", limit) : "None"); AddIngameLine("Frag limit", (limit !=0 ) ? va("%i", limit) : "None");
break;
} }
} }
AddIngameLine("Match mode", (matchmode != 0) ? "On" : "Off"); AddIngameLine("Match mode", (matchmode != 0) ? "On" : "Off");
@ -2782,6 +2798,11 @@ static void UI_OwnerDraw(float x, float y, float w, float h, float text_x, float
case UI_RQ3_RADIOPRESET10: case UI_RQ3_RADIOPRESET10:
UI_RQ3_DrawPreset(&rect, scale, color, ownerDraw - UI_RQ3_RADIOPRESET1 + 1, textStyle); UI_RQ3_DrawPreset(&rect, scale, color, ownerDraw - UI_RQ3_RADIOPRESET1 + 1, textStyle);
break; break;
//Makro - join team menu items
case UI_RQ3_JOINTEAM1:
case UI_RQ3_JOINTEAM2:
UI_RQ3_DrawJoinTeam(&rect, scale, color, (ownerDraw == UI_RQ3_JOINTEAM1) ? 1 : 2, textStyle);
break;
case UI_SELECTEDPLAYER: case UI_SELECTEDPLAYER:
UI_DrawSelectedPlayer(&rect, scale, color, textStyle); UI_DrawSelectedPlayer(&rect, scale, color, textStyle);
break; break;
@ -4233,6 +4254,12 @@ static void UI_RunMenuScript(char **args)
UI_LoadArenas(); UI_LoadArenas();
UI_MapCountVote(); UI_MapCountVote();
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "ingame_callvote"); Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, "ingame_callvote");
//Makro - get the team names
} else if (Q_stricmp(name, "updateJoinTeamNames") == 0) {
char info[MAX_INFO_STRING];
trap_GetConfigString(CS_SERVERINFO, info, sizeof(info));
strncpy(team1Name, UI_Cvar_VariableString("g_RQ3_team1Name"), sizeof(team1Name));
strncpy(team2Name, UI_Cvar_VariableString("g_RQ3_team2Name"), sizeof(team2Name));
} else if (Q_stricmp(name, "saveControls") == 0) { } else if (Q_stricmp(name, "saveControls") == 0) {
Controls_SetConfig(qtrue); Controls_SetConfig(qtrue);
} else if (Q_stricmp(name, "loadControls") == 0) { } else if (Q_stricmp(name, "loadControls") == 0) {

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.24 2002/11/09 13:05:02 makro
// g_RQ3_teamXname cvars are now used in the join menu
//
// Revision 1.23 2002/09/29 16:06:45 jbravo // Revision 1.23 2002/09/29 16:06:45 jbravo
// Work done at the HPWorld expo // Work done at the HPWorld expo
// //
@ -2678,7 +2681,8 @@ qboolean Item_TextField_HandleKey(itemDef_t * item, int key)
} }
} }
if (key == K_TAB || key == K_DOWNARROW || key == K_KP_DOWNARROW) { //Makro - added mousewheel
if (key == K_TAB || key == K_DOWNARROW || key == K_KP_DOWNARROW || key == K_MWHEELDOWN) {
newItem = Menu_SetNextCursorItem(item->parent); newItem = Menu_SetNextCursorItem(item->parent);
if (newItem if (newItem
&& (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) { && (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) {
@ -2686,7 +2690,8 @@ qboolean Item_TextField_HandleKey(itemDef_t * item, int key)
} }
} }
if (key == K_UPARROW || key == K_KP_UPARROW) { //Makro - added mousewheel
if (key == K_UPARROW || key == K_KP_UPARROW || key == K_MWHEELUP) {
newItem = Menu_SetPrevCursorItem(item->parent); newItem = Menu_SetPrevCursorItem(item->parent);
if (newItem if (newItem
&& (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) { && (newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD)) {

View file

@ -12,7 +12,7 @@
focusColor 1 .75 0 1 // Menu focus color for text and items focusColor 1 .75 0 1 // Menu focus color for text and items
style 1 style 1
shadowStyle 1 shadowStyle 1
onOpen { play "sound/misc/menu1.wav" } onOpen { play "sound/misc/menu1.wav" ; uiScript "updateJoinTeamNames" }
//Window //Window
@ -55,9 +55,10 @@
itemdef { itemdef {
name team name team
text "1. Silver Team:" text "1."
ownerDraw UI_RQ3_JOINTEAM1
shortcutKey "1" shortcutKey "1"
type ITEM_TYPE_BUTTON //type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
textstyle ITEM_TEXTSTYLE_NORMAL textstyle ITEM_TEXTSTYLE_NORMAL
rect 8 36 128 20 rect 8 36 128 20
@ -65,7 +66,7 @@
textalignx 16 textalignx 16
textaligny 18 textaligny 18
textscale .225 textscale .225
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 1 visible 1
action { play "sound/misc/menu1.wav" ; exec "cmd team red" ; uiScript "weapAfterJoin" ; close "ingame_join" } action { play "sound/misc/menu1.wav" ; exec "cmd team red" ; uiScript "weapAfterJoin" ; close "ingame_join" }
} }
@ -91,9 +92,10 @@
itemdef { itemdef {
name team name team
text "2. Black Team:" text "2."
ownerDraw UI_RQ3_JOINTEAM2
shortcutKey "2" shortcutKey "2"
type ITEM_TYPE_BUTTON //type ITEM_TYPE_BUTTON
style WINDOW_STYLE_EMPTY style WINDOW_STYLE_EMPTY
textstyle ITEM_TEXTSTYLE_NORMAL textstyle ITEM_TEXTSTYLE_NORMAL
rect 8 56 128 20 rect 8 56 128 20
@ -101,7 +103,7 @@
textalignx 16 textalignx 16
textaligny 18 textaligny 18
textscale .225 textscale .225
forecolor 1 1 1 1 forecolor 1 1 1 1
visible 1 visible 1
action { play "sound/misc/menu1.wav" ; exec "cmd team blue" ; uiScript "weapAfterJoin" ; close "ingame_join" } action { play "sound/misc/menu1.wav" ; exec "cmd team blue" ; uiScript "weapAfterJoin" ; close "ingame_join" }
} }

View file

@ -209,6 +209,10 @@
#define UI_RQ3_RADIOPRESET9 159 #define UI_RQ3_RADIOPRESET9 159
#define UI_RQ3_RADIOPRESET10 160 #define UI_RQ3_RADIOPRESET10 160
//Makro - join menu items
#define UI_RQ3_JOINTEAM1 161
#define UI_RQ3_JOINTEAM2 162
#define UI_OWNERDRAW_BASE 200 #define UI_OWNERDRAW_BASE 200
#define UI_HANDICAP 200 #define UI_HANDICAP 200
#define UI_EFFECTS 201 #define UI_EFFECTS 201