Improve keyboard/joystick input in Team Arena UI
Make Yes/No, Multi, Slider, and Bind items allow enter key to change value without mouse over item. Add support for left and right arrow keys and joystick button 1-4 to Yes/No, Multi, and Slider and many item specific 'ownerdraw' key handlers. Listbox still requires mouse hover and Team Arena main menu requires mouse hover to get anywhere... Enabling K_JOY1-4 to select in default key handler also caused additional mouse button (K_AUX1-16) to select, which is done in q3_ui as well. Both handle K_AUX equally badly (not treated as a mouse button and not handled by item specific key handlers), so it's probably fine.
This commit is contained in:
parent
6394180224
commit
d875c1f03c
3 changed files with 229 additions and 207 deletions
|
@ -2260,79 +2260,78 @@ static qboolean UI_OwnerDrawVisible(int flags) {
|
|||
}
|
||||
|
||||
static qboolean UI_Handicap_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int h;
|
||||
h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );
|
||||
if (key == K_MOUSE2) {
|
||||
h -= 5;
|
||||
} else {
|
||||
h += 5;
|
||||
}
|
||||
if (h > 100) {
|
||||
h = 5;
|
||||
} else if (h < 5) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int h;
|
||||
|
||||
h = Com_Clamp( 5, 100, trap_Cvar_VariableValue("handicap") );
|
||||
h += 5 * select;
|
||||
|
||||
if (h > 100) {
|
||||
h = 5;
|
||||
} else if (h < 5) {
|
||||
h = 100;
|
||||
}
|
||||
trap_Cvar_Set( "handicap", va( "%i", h) );
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
|
||||
trap_Cvar_SetValue( "handicap", h );
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_Effects_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
uiInfo.effectsColor += select;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
uiInfo.effectsColor--;
|
||||
} else {
|
||||
uiInfo.effectsColor++;
|
||||
}
|
||||
|
||||
if( uiInfo.effectsColor > 6 ) {
|
||||
uiInfo.effectsColor = 0;
|
||||
if( uiInfo.effectsColor > 6 ) {
|
||||
uiInfo.effectsColor = 0;
|
||||
} else if (uiInfo.effectsColor < 0) {
|
||||
uiInfo.effectsColor = 6;
|
||||
uiInfo.effectsColor = 6;
|
||||
}
|
||||
|
||||
trap_Cvar_SetValue( "color1", uitogamecode[uiInfo.effectsColor] );
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
trap_Cvar_SetValue( "color1", uitogamecode[uiInfo.effectsColor] );
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_ClanName_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int i;
|
||||
i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int i;
|
||||
|
||||
i = UI_TeamIndexFromName(UI_Cvar_VariableString("ui_teamName"));
|
||||
|
||||
if (uiInfo.teamList[i].cinematic >= 0) {
|
||||
trap_CIN_StopCinematic(uiInfo.teamList[i].cinematic);
|
||||
trap_CIN_StopCinematic(uiInfo.teamList[i].cinematic);
|
||||
uiInfo.teamList[i].cinematic = -1;
|
||||
}
|
||||
if (key == K_MOUSE2) {
|
||||
i--;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
if (i >= uiInfo.teamCount) {
|
||||
i = 0;
|
||||
} else if (i < 0) {
|
||||
|
||||
i += select;
|
||||
|
||||
if (i >= uiInfo.teamCount) {
|
||||
i = 0;
|
||||
} else if (i < 0) {
|
||||
i = uiInfo.teamCount - 1;
|
||||
}
|
||||
trap_Cvar_Set( "ui_teamName", uiInfo.teamList[i].teamName);
|
||||
UI_HeadCountByTeam();
|
||||
UI_FeederSelection(FEEDER_HEADS, 0);
|
||||
updateModel = qtrue;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
|
||||
trap_Cvar_Set( "ui_teamName", uiInfo.teamList[i].teamName);
|
||||
UI_HeadCountByTeam();
|
||||
UI_FeederSelection(FEEDER_HEADS, 0);
|
||||
updateModel = qtrue;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_GameType_HandleKey(int flags, float *special, int key, qboolean resetMap) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int oldCount = UI_MapCountByGameType(qtrue);
|
||||
|
||||
// hard coded mess here
|
||||
if (key == K_MOUSE2) {
|
||||
if (select < 0) {
|
||||
ui_gameType.integer--;
|
||||
if (ui_gameType.integer == 2) {
|
||||
ui_gameType.integer = 1;
|
||||
|
@ -2348,57 +2347,49 @@ static qboolean UI_GameType_HandleKey(int flags, float *special, int key, qboole
|
|||
}
|
||||
}
|
||||
|
||||
if (uiInfo.gameTypes[ui_gameType.integer].gtEnum == GT_TOURNAMENT) {
|
||||
trap_Cvar_Set("ui_Q3Model", "1");
|
||||
if (uiInfo.gameTypes[ui_gameType.integer].gtEnum < GT_TEAM) {
|
||||
trap_Cvar_SetValue( "ui_Q3Model", 1 );
|
||||
} else {
|
||||
trap_Cvar_Set("ui_Q3Model", "0");
|
||||
trap_Cvar_SetValue( "ui_Q3Model", 0 );
|
||||
}
|
||||
|
||||
trap_Cvar_Set("ui_gameType", va("%d", ui_gameType.integer));
|
||||
trap_Cvar_SetValue("ui_gameType", ui_gameType.integer);
|
||||
UI_SetCapFragLimits(qtrue);
|
||||
UI_LoadBestScores(uiInfo.mapList[ui_currentMap.integer].mapLoadName, uiInfo.gameTypes[ui_gameType.integer].gtEnum);
|
||||
if (resetMap && oldCount != UI_MapCountByGameType(qtrue)) {
|
||||
trap_Cvar_Set( "ui_currentMap", "0");
|
||||
trap_Cvar_SetValue( "ui_currentMap", 0);
|
||||
Menu_SetFeederSelection(NULL, FEEDER_MAPS, 0, NULL);
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_NetGameType_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
ui_netGameType.integer += select;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
ui_netGameType.integer--;
|
||||
} else {
|
||||
ui_netGameType.integer++;
|
||||
if (ui_netGameType.integer < 0) {
|
||||
ui_netGameType.integer = uiInfo.numGameTypes - 1;
|
||||
} else if (ui_netGameType.integer >= uiInfo.numGameTypes) {
|
||||
ui_netGameType.integer = 0;
|
||||
}
|
||||
|
||||
if (ui_netGameType.integer < 0) {
|
||||
ui_netGameType.integer = uiInfo.numGameTypes - 1;
|
||||
} else if (ui_netGameType.integer >= uiInfo.numGameTypes) {
|
||||
ui_netGameType.integer = 0;
|
||||
}
|
||||
|
||||
trap_Cvar_Set( "ui_netGameType", va("%d", ui_netGameType.integer));
|
||||
trap_Cvar_Set( "ui_actualnetGameType", va("%d", uiInfo.gameTypes[ui_netGameType.integer].gtEnum));
|
||||
trap_Cvar_Set( "ui_currentNetMap", "0");
|
||||
trap_Cvar_SetValue( "ui_netGameType", ui_netGameType.integer);
|
||||
trap_Cvar_SetValue( "ui_actualnetGameType", uiInfo.gameTypes[ui_netGameType.integer].gtEnum);
|
||||
trap_Cvar_SetValue( "ui_currentNetMap", 0);
|
||||
UI_MapCountByGameType(qfalse);
|
||||
Menu_SetFeederSelection(NULL, FEEDER_ALLMAPS, 0, NULL);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_JoinGameType_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
ui_joinGameType.integer--;
|
||||
} else {
|
||||
ui_joinGameType.integer++;
|
||||
}
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
ui_joinGameType.integer += select;
|
||||
|
||||
if (ui_joinGameType.integer < 0) {
|
||||
ui_joinGameType.integer = uiInfo.numJoinGameTypes - 1;
|
||||
|
@ -2406,7 +2397,7 @@ static qboolean UI_JoinGameType_HandleKey(int flags, float *special, int key) {
|
|||
ui_joinGameType.integer = 0;
|
||||
}
|
||||
|
||||
trap_Cvar_Set( "ui_joinGameType", va("%d", ui_joinGameType.integer));
|
||||
trap_Cvar_SetValue( "ui_joinGameType", ui_joinGameType.integer);
|
||||
UI_BuildServerDisplayList(qtrue);
|
||||
return qtrue;
|
||||
}
|
||||
|
@ -2416,64 +2407,54 @@ static qboolean UI_JoinGameType_HandleKey(int flags, float *special, int key) {
|
|||
|
||||
|
||||
static qboolean UI_Skill_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int i = trap_Cvar_VariableValue( "g_spSkill" );
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int i = trap_Cvar_VariableValue( "g_spSkill" );
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
i--;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
i += select;
|
||||
|
||||
if (i < 1) {
|
||||
if (i < 1) {
|
||||
i = numSkillLevels;
|
||||
} else if (i > numSkillLevels) {
|
||||
i = 1;
|
||||
}
|
||||
i = 1;
|
||||
}
|
||||
|
||||
trap_Cvar_Set("g_spSkill", va("%i", i));
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
trap_Cvar_SetValue("g_spSkill", i);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_TeamName_HandleKey(int flags, float *special, int key, qboolean blue) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int i;
|
||||
i = UI_TeamIndexFromName(UI_Cvar_VariableString((blue) ? "ui_blueTeam" : "ui_redTeam"));
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int i;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
i--;
|
||||
} else {
|
||||
i++;
|
||||
}
|
||||
i = UI_TeamIndexFromName(UI_Cvar_VariableString((blue) ? "ui_blueTeam" : "ui_redTeam"));
|
||||
i += select;
|
||||
|
||||
if (i >= uiInfo.teamCount) {
|
||||
i = 0;
|
||||
} else if (i < 0) {
|
||||
if (i >= uiInfo.teamCount) {
|
||||
i = 0;
|
||||
} else if (i < 0) {
|
||||
i = uiInfo.teamCount - 1;
|
||||
}
|
||||
|
||||
trap_Cvar_Set( (blue) ? "ui_blueTeam" : "ui_redTeam", uiInfo.teamList[i].teamName);
|
||||
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
trap_Cvar_Set( (blue) ? "ui_blueTeam" : "ui_redTeam", uiInfo.teamList[i].teamName);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_TeamMember_HandleKey(int flags, float *special, int key, qboolean blue, int num) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
// 0 - None
|
||||
// 1 - Human
|
||||
// 2..NumCharacters - Bot
|
||||
char *cvar = va(blue ? "ui_blueteam%i" : "ui_redteam%i", num);
|
||||
int value = trap_Cvar_VariableValue(cvar);
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
value--;
|
||||
} else {
|
||||
value++;
|
||||
}
|
||||
value += select;
|
||||
|
||||
if (ui_actualNetGameType.integer >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount + 2) {
|
||||
|
@ -2489,20 +2470,16 @@ static qboolean UI_TeamMember_HandleKey(int flags, float *special, int key, qboo
|
|||
}
|
||||
}
|
||||
|
||||
trap_Cvar_Set(cvar, va("%i", value));
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
trap_Cvar_SetValue(cvar, value);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_NetSource_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
ui_netSource.integer--;
|
||||
} else {
|
||||
ui_netSource.integer++;
|
||||
}
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
ui_netSource.integer += select;
|
||||
|
||||
if(ui_netSource.integer >= UIAS_GLOBAL1 && ui_netSource.integer <= UIAS_GLOBAL5)
|
||||
{
|
||||
|
@ -2514,12 +2491,8 @@ static qboolean UI_NetSource_HandleKey(int flags, float *special, int key) {
|
|||
trap_Cvar_VariableStringBuffer(cvarname, masterstr, sizeof(masterstr));
|
||||
if(*masterstr)
|
||||
break;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
ui_netSource.integer--;
|
||||
} else {
|
||||
ui_netSource.integer++;
|
||||
}
|
||||
|
||||
ui_netSource.integer += select;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2533,54 +2506,48 @@ static qboolean UI_NetSource_HandleKey(int flags, float *special, int key) {
|
|||
if (!(ui_netSource.integer >= UIAS_GLOBAL1 && ui_netSource.integer <= UIAS_GLOBAL5)) {
|
||||
UI_StartServerRefresh(qtrue);
|
||||
}
|
||||
trap_Cvar_Set( "ui_netSource", va("%d", ui_netSource.integer));
|
||||
trap_Cvar_SetValue( "ui_netSource", ui_netSource.integer);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_NetFilter_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
ui_serverFilterType.integer += select;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
ui_serverFilterType.integer--;
|
||||
} else {
|
||||
ui_serverFilterType.integer++;
|
||||
}
|
||||
|
||||
if (ui_serverFilterType.integer >= numServerFilters) {
|
||||
ui_serverFilterType.integer = 0;
|
||||
} else if (ui_serverFilterType.integer < 0) {
|
||||
ui_serverFilterType.integer = numServerFilters - 1;
|
||||
if (ui_serverFilterType.integer >= numServerFilters) {
|
||||
ui_serverFilterType.integer = 0;
|
||||
} else if (ui_serverFilterType.integer < 0) {
|
||||
ui_serverFilterType.integer = numServerFilters - 1;
|
||||
}
|
||||
UI_BuildServerDisplayList(qtrue);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_OpponentName_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
if (key == K_MOUSE2) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
if (select < 0) {
|
||||
UI_PriorOpponent();
|
||||
} else {
|
||||
UI_NextOpponent();
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_BotName_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int game = trap_Cvar_VariableValue("g_gametype");
|
||||
int value = uiInfo.botIndex;
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
value--;
|
||||
} else {
|
||||
value++;
|
||||
}
|
||||
value += select;
|
||||
|
||||
if (game >= GT_TEAM) {
|
||||
if (value >= uiInfo.characterCount + 2) {
|
||||
|
@ -2596,30 +2563,29 @@ static qboolean UI_BotName_HandleKey(int flags, float *special, int key) {
|
|||
}
|
||||
}
|
||||
uiInfo.botIndex = value;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_BotSkill_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
if (key == K_MOUSE2) {
|
||||
uiInfo.skillIndex--;
|
||||
} else {
|
||||
uiInfo.skillIndex++;
|
||||
}
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
uiInfo.skillIndex += select;
|
||||
|
||||
if (uiInfo.skillIndex >= numSkillLevels) {
|
||||
uiInfo.skillIndex = 0;
|
||||
} else if (uiInfo.skillIndex < 0) {
|
||||
uiInfo.skillIndex = numSkillLevels-1;
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
static qboolean UI_RedBlue_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
uiInfo.redBlue ^= 1;
|
||||
return qtrue;
|
||||
}
|
||||
|
@ -2627,19 +2593,16 @@ static qboolean UI_RedBlue_HandleKey(int flags, float *special, int key) {
|
|||
}
|
||||
|
||||
static qboolean UI_Crosshair_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
if (key == K_MOUSE2) {
|
||||
uiInfo.currentCrosshair--;
|
||||
} else {
|
||||
uiInfo.currentCrosshair++;
|
||||
}
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
uiInfo.currentCrosshair += select;
|
||||
|
||||
if (uiInfo.currentCrosshair >= NUM_CROSSHAIRS) {
|
||||
uiInfo.currentCrosshair = 0;
|
||||
} else if (uiInfo.currentCrosshair < 0) {
|
||||
uiInfo.currentCrosshair = NUM_CROSSHAIRS - 1;
|
||||
}
|
||||
trap_Cvar_Set("cg_drawCrosshair", va("%d", uiInfo.currentCrosshair));
|
||||
trap_Cvar_SetValue("cg_drawCrosshair", uiInfo.currentCrosshair);
|
||||
return qtrue;
|
||||
}
|
||||
return qfalse;
|
||||
|
@ -2648,7 +2611,8 @@ static qboolean UI_Crosshair_HandleKey(int flags, float *special, int key) {
|
|||
|
||||
|
||||
static qboolean UI_SelectedPlayer_HandleKey(int flags, float *special, int key) {
|
||||
if (key == K_MOUSE1 || key == K_MOUSE2 || key == K_ENTER || key == K_KP_ENTER) {
|
||||
int select = UI_SelectForKey(key);
|
||||
if (select != 0) {
|
||||
int selected;
|
||||
|
||||
UI_BuildPlayerList();
|
||||
|
@ -2656,12 +2620,8 @@ static qboolean UI_SelectedPlayer_HandleKey(int flags, float *special, int key)
|
|||
return qfalse;
|
||||
}
|
||||
selected = trap_Cvar_VariableValue("cg_selectedPlayer");
|
||||
|
||||
if (key == K_MOUSE2) {
|
||||
selected--;
|
||||
} else {
|
||||
selected++;
|
||||
}
|
||||
|
||||
selected += select;
|
||||
|
||||
if (selected > uiInfo.myTeamCount) {
|
||||
selected = 0;
|
||||
|
@ -2670,11 +2630,11 @@ static qboolean UI_SelectedPlayer_HandleKey(int flags, float *special, int key)
|
|||
}
|
||||
|
||||
if (selected == uiInfo.myTeamCount) {
|
||||
trap_Cvar_Set( "cg_selectedPlayerName", "Everyone");
|
||||
trap_Cvar_Set( "cg_selectedPlayerName", "Everyone");
|
||||
} else {
|
||||
trap_Cvar_Set( "cg_selectedPlayerName", uiInfo.teamNames[selected]);
|
||||
trap_Cvar_Set( "cg_selectedPlayerName", uiInfo.teamNames[selected]);
|
||||
}
|
||||
trap_Cvar_Set( "cg_selectedPlayer", va("%d", selected));
|
||||
trap_Cvar_SetValue( "cg_selectedPlayer", selected);
|
||||
}
|
||||
return qfalse;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue