diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-10-21 07:58:54 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:16:58 +0000 |
commit | d935b1ba18d3585e468175835693c2a04c23d5a7 (patch) | |
tree | df253c2ad28e26c80aa2f2b90568ae37eb56a096 /src/ui | |
parent | c098b029c82b3a3d568feb67c24d11ad47328fd4 (diff) |
* Add options in the ingame UI to callvote sudden_death and callvote nextmap (Exclamation)
* Prevent up arrow, down arrow, tab, and mouse buttons from unexpectedly sending Say: menu text
* Fix a crash introduced by r1813 when using teamsay on a map without location entities
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/ui_main.c | 8 | ||||
-rw-r--r-- | src/ui/ui_shared.c | 12 |
2 files changed, 8 insertions, 12 deletions
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 ); } |