summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/ui/ingame_game.menu52
-rw-r--r--assets/ui/say.menu4
-rw-r--r--src/cgame/cg_servercmds.c3
-rw-r--r--src/ui/ui_main.c8
-rw-r--r--src/ui/ui_shared.c12
5 files changed, 58 insertions, 21 deletions
diff --git a/assets/ui/ingame_game.menu b/assets/ui/ingame_game.menu
index a9ab5a70..8348859a 100644
--- a/assets/ui/ingame_game.menu
+++ b/assets/ui/ingame_game.menu
@@ -4,7 +4,7 @@
\\ INGAME GAME BOX \\
#define W 320
-#define H 290
+#define H 310
#define X 10
#define Y 60
#define BORDER 10
@@ -17,8 +17,8 @@
#define MAP_X (SIDEBUTT_W+BORDER)
#define MAP_Y ((2*BORDER)+TOPBUTT_H)
-#define MAP_W 100
-#define MAP_H 75
+#define MAP_W 124
+#define MAP_H 93
#define MAPLIST_X MAP_X
#define MAPLIST_Y ((3*BORDER)+TOPBUTT_H+MAP_H)
#define MAPLIST_W (W-((2*BORDER)+SIDEBUTT_W))
@@ -26,7 +26,7 @@
#define MAPBUTT_X (MAP_X+MAP_W+BORDER)
#define MAPBUTT_Y MAP_Y
#define MAPBUTT_W (W-(MAPBUTT_X+BORDER))
-#define MAPBUTT_H 25
+#define MAPBUTT_H 20
#define PBUTT_X MAP_X
#define PBUTT_Y (H-((2*PBUTT_H)+BORDER))
@@ -304,7 +304,7 @@
{
name mapvote
group gameGrp
- text "Restart Current Map"
+ text "Load Selected Map Next"
type ITEM_TYPE_BUTTON
textscale .25
rect MAPBUTT_X (MAPBUTT_Y+MAPBUTT_H) MAPBUTT_W MAPBUTT_H
@@ -315,6 +315,26 @@
action
{
play "sound/misc/menu1.wav";
+ uiScript voteNextMap;
+ uiScript closeingame
+ }
+ }
+
+ itemDef
+ {
+ name mapvote
+ group gameGrp
+ text "Restart Current Map"
+ type ITEM_TYPE_BUTTON
+ textscale .25
+ rect MAPBUTT_X (MAPBUTT_Y+(2*MAPBUTT_H)) MAPBUTT_W MAPBUTT_H
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
+ forecolor 1 1 1 1
+ visible MENU_FALSE
+ action
+ {
+ play "sound/misc/menu1.wav";
exec "cmd callvote map_restart";
uiScript closeingame
}
@@ -324,10 +344,30 @@
{
name mapvote
group gameGrp
+ text "Begin Sudden Death"
+ type ITEM_TYPE_BUTTON
+ textscale .25
+ rect MAPBUTT_X (MAPBUTT_Y+(3*MAPBUTT_H)) MAPBUTT_W MAPBUTT_H
+ textalign ALIGN_LEFT
+ textvalign VALIGN_CENTER
+ forecolor 1 1 1 1
+ visible MENU_FALSE
+ action
+ {
+ play "sound/misc/menu1.wav";
+ exec "cmd callvote sudden_death";
+ uiScript closeingame
+ }
+ }
+
+ itemDef
+ {
+ name mapvote
+ group gameGrp
text "End Match In Draw"
type ITEM_TYPE_BUTTON
textscale .25
- rect MAPBUTT_X (MAPBUTT_Y+(2*MAPBUTT_H)) MAPBUTT_W MAPBUTT_H
+ rect MAPBUTT_X (MAPBUTT_Y+(4*MAPBUTT_H)) MAPBUTT_W MAPBUTT_H
textalign ALIGN_LEFT
textvalign VALIGN_CENTER
forecolor 1 1 1 1
diff --git a/assets/ui/say.menu b/assets/ui/say.menu
index 7b804b45..1dd2380b 100644
--- a/assets/ui/say.menu
+++ b/assets/ui/say.menu
@@ -5,9 +5,9 @@
#define BORDER 10
#define X BORDER
-#define Y 200
+#define Y BORDER
#define W (600-(2*BORDER))
-#define H 40
+#define H (480-(2*BORDER))
// Say to All
menuDef
diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c
index 6c43782a..0b562360 100644
--- a/src/cgame/cg_servercmds.c
+++ b/src/cgame/cg_servercmds.c
@@ -947,7 +947,8 @@ static void CG_Say( int clientNum, saymode_t mode, const char *text )
centity_t *locent;
locent = CG_GetPlayerLocation( );
- locationNum = locent->currentState.generic1;
+ if( locent )
+ locationNum = locent->currentState.generic1;
}
else
locationNum = ci->location;
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 34fe8b98..24cb6b7c 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -3186,6 +3186,14 @@ static void UI_RunMenuScript( char **args )
uiInfo.mapList[ui_selectedMap.integer].mapLoadName ) );
}
}
+ else if( Q_stricmp( name, "voteNextMap" ) == 0 )
+ {
+ if( ui_selectedMap.integer >= 0 && ui_selectedMap.integer < uiInfo.mapCount )
+ {
+ trap_Cmd_ExecuteText( EXEC_APPEND, va( "callvote nextmap %s\n",
+ uiInfo.mapList[ui_selectedMap.integer].mapLoadName ) );
+ }
+ }
else if( Q_stricmp( name, "voteKick" ) == 0 )
{
if( uiInfo.playerIndex >= 0 && uiInfo.playerIndex < uiInfo.playerCount )
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index d5ed79dc..524df189 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -3449,21 +3449,10 @@ qboolean Item_TextField_HandleKey( itemDef_t *item, int key )
if( newItem && ( newItem->type == ITEM_TYPE_EDITFIELD || newItem->type == ITEM_TYPE_NUMERICFIELD ) )
g_editItem = newItem;
- else
- {
- releaseFocus = qtrue;
- goto exit;
- }
-
break;
case K_ENTER:
case K_KP_ENTER:
- case K_ESCAPE:
- case K_MOUSE1:
- case K_MOUSE2:
- case K_MOUSE3:
- case K_MOUSE4:
releaseFocus = qtrue;
goto exit;
@@ -4017,7 +4006,6 @@ void Menu_HandleKey( menuDef_t *menu, int key, qboolean down )
else if( key == K_MOUSE1 || key == K_MOUSE2 || key == K_MOUSE3 )
{
g_editingField = qfalse;
- Item_RunScript( g_editItem, g_editItem->onTextEntry );
g_editItem = NULL;
Display_MouseMove( NULL, DC->cursorx, DC->cursory );
}