#include "ui_local.h"
Include dependency graph for ui_removebots.c:

Go to the source code of this file.
Data Structures | |
| struct | removeBotsMenuInfo_t |
Defines | |
| #define | ART_ARROWDOWN "menu/art/arrows_vert_bot" |
| #define | ART_ARROWS "menu/art/arrows_vert_0" |
| #define | ART_ARROWUP "menu/art/arrows_vert_top" |
| #define | ART_BACK0 "menu/art/back_0" |
| #define | ART_BACK1 "menu/art/back_1" |
| #define | ART_BACKGROUND "menu/art/addbotframe" |
| #define | ART_DELETE0 "menu/art/delete_0" |
| #define | ART_DELETE1 "menu/art/delete_1" |
| #define | ID_BACK 13 |
| #define | ID_BOTNAME0 20 |
| #define | ID_BOTNAME1 21 |
| #define | ID_BOTNAME2 22 |
| #define | ID_BOTNAME3 23 |
| #define | ID_BOTNAME4 24 |
| #define | ID_BOTNAME5 25 |
| #define | ID_BOTNAME6 26 |
| #define | ID_DELETE 12 |
| #define | ID_DOWN 11 |
| #define | ID_UP 10 |
Functions | |
| void | UI_RemoveBots_Cache (void) |
| void | UI_RemoveBotsMenu (void) |
| void | UI_RemoveBotsMenu_BackEvent (void *ptr, int event) |
| void | UI_RemoveBotsMenu_BotEvent (void *ptr, int event) |
| void | UI_RemoveBotsMenu_DeleteEvent (void *ptr, int event) |
| void | UI_RemoveBotsMenu_DownEvent (void *ptr, int event) |
| void | UI_RemoveBotsMenu_GetBots (void) |
| void | UI_RemoveBotsMenu_Init (void) |
| void | UI_RemoveBotsMenu_SetBotNames (void) |
| void | UI_RemoveBotsMenu_UpEvent (void *ptr, int event) |
Variables | |
| removeBotsMenuInfo_t | removeBotsMenuInfo |
|
|
Definition at line 42 of file ui_removebots.c. |
|
|
Definition at line 40 of file ui_removebots.c. |
|
|
Definition at line 41 of file ui_removebots.c. |
|
|
Definition at line 36 of file ui_removebots.c. |
|
|
Definition at line 37 of file ui_removebots.c. |
|
|
Definition at line 35 of file ui_removebots.c. |
|
|
Definition at line 38 of file ui_removebots.c. Referenced by UI_RemoveBots_Cache(). |
|
|
Definition at line 39 of file ui_removebots.c. Referenced by UI_RemoveBots_Cache(). |
|
|
Definition at line 47 of file ui_removebots.c. |
|
|
Definition at line 48 of file ui_removebots.c. |
|
|
Definition at line 49 of file ui_removebots.c. |
|
|
Definition at line 50 of file ui_removebots.c. |
|
|
Definition at line 51 of file ui_removebots.c. |
|
|
Definition at line 52 of file ui_removebots.c. |
|
|
Definition at line 53 of file ui_removebots.c. |
|
|
Definition at line 54 of file ui_removebots.c. |
|
|
Definition at line 46 of file ui_removebots.c. |
|
|
Definition at line 45 of file ui_removebots.c. |
|
|
Definition at line 44 of file ui_removebots.c. |
|
|
Definition at line 211 of file ui_removebots.c. References ART_BACK0, ART_BACK1, ART_BACKGROUND, ART_DELETE0, ART_DELETE1, and trap_R_RegisterShaderNoMip(). 00211 {
00212 trap_R_RegisterShaderNoMip( ART_BACKGROUND );
00213 trap_R_RegisterShaderNoMip( ART_BACK0 );
00214 trap_R_RegisterShaderNoMip( ART_BACK1 );
00215 trap_R_RegisterShaderNoMip( ART_DELETE0 );
00216 trap_R_RegisterShaderNoMip( ART_DELETE1 );
00217 }
|
Here is the call graph for this function:

|
|
Definition at line 339 of file ui_removebots.c. References removeBotsMenuInfo_t::menu, removeBotsMenuInfo, UI_PushMenu(), and UI_RemoveBotsMenu_Init(). 00339 {
00340 UI_RemoveBotsMenu_Init();
00341 UI_PushMenu( &removeBotsMenuInfo.menu );
00342 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 135 of file ui_removebots.c. References UI_PopMenu(). 00135 {
00136 if (event != QM_ACTIVATED) {
00137 return;
00138 }
00139 UI_PopMenu();
00140 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 119 of file ui_removebots.c. References removeBotsMenuInfo_t::bots, menutext_s::color, removeBotsMenuInfo, and removeBotsMenuInfo_t::selectedBotNum. 00119 {
00120 if (event != QM_ACTIVATED) {
00121 return;
00122 }
00123
00124 removeBotsMenuInfo.bots[removeBotsMenuInfo.selectedBotNum].color = color_orange;
00125 removeBotsMenuInfo.selectedBotNum = ((menucommon_s*)ptr)->id - ID_BOTNAME0;
00126 removeBotsMenuInfo.bots[removeBotsMenuInfo.selectedBotNum].color = color_white;
00127 }
|
|
||||||||||||
|
Definition at line 105 of file ui_removebots.c. References removeBotsMenuInfo_t::baseBotNum, removeBotsMenuInfo_t::botClientNums, EXEC_APPEND, removeBotsMenuInfo, removeBotsMenuInfo_t::selectedBotNum, trap_Cmd_ExecuteText(), and va(). 00105 {
00106 if (event != QM_ACTIVATED) {
00107 return;
00108 }
00109
00110 trap_Cmd_ExecuteText( EXEC_APPEND, va("clientkick %i\n", removeBotsMenuInfo.botClientNums[removeBotsMenuInfo.baseBotNum + removeBotsMenuInfo.selectedBotNum]) );
00111 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 165 of file ui_removebots.c. References removeBotsMenuInfo_t::baseBotNum, removeBotsMenuInfo_t::numBots, removeBotsMenuInfo, and UI_RemoveBotsMenu_SetBotNames(). 00165 {
00166 if (event != QM_ACTIVATED) {
00167 return;
00168 }
00169
00170 if( removeBotsMenuInfo.baseBotNum + 7 < removeBotsMenuInfo.numBots ) {
00171 removeBotsMenuInfo.baseBotNum++;
00172 UI_RemoveBotsMenu_SetBotNames();
00173 }
00174 }
|
Here is the call graph for this function:

|
|
Definition at line 182 of file ui_removebots.c. References atoi, removeBotsMenuInfo_t::botClientNums, CS_PLAYERS, CS_SERVERINFO, Info_ValueForKey(), MAX_INFO_STRING, n, removeBotsMenuInfo_t::numBots, removeBotsMenuInfo, and trap_GetConfigString(). Referenced by UI_RemoveBotsMenu_Init(). 00182 {
00183 int numPlayers;
00184 int isBot;
00185 int n;
00186 char info[MAX_INFO_STRING];
00187
00188 trap_GetConfigString( CS_SERVERINFO, info, sizeof(info) );
00189 numPlayers = atoi( Info_ValueForKey( info, "sv_maxclients" ) );
00190 removeBotsMenuInfo.numBots = 0;
00191
00192 for( n = 0; n < numPlayers; n++ ) {
00193 trap_GetConfigString( CS_PLAYERS + n, info, MAX_INFO_STRING );
00194
00195 isBot = atoi( Info_ValueForKey( info, "skill" ) );
00196 if( !isBot ) {
00197 continue;
00198 }
00199
00200 removeBotsMenuInfo.botClientNums[removeBotsMenuInfo.numBots] = n;
00201 removeBotsMenuInfo.numBots++;
00202 }
00203 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 87 of file ui_removebots.c. References removeBotsMenuInfo_t::baseBotNum, removeBotsMenuInfo_t::botClientNums, removeBotsMenuInfo_t::botnames, CS_PLAYERS, Info_ValueForKey(), MAX_INFO_STRING, n, removeBotsMenuInfo_t::numBots, Q_CleanStr(), Q_strncpyz(), removeBotsMenuInfo, and trap_GetConfigString(). Referenced by UI_RemoveBotsMenu_DownEvent(), UI_RemoveBotsMenu_Init(), and UI_RemoveBotsMenu_UpEvent(). 00087 {
00088 int n;
00089 char info[MAX_INFO_STRING];
00090
00091 for ( n = 0; (n < 7) && (removeBotsMenuInfo.baseBotNum + n < removeBotsMenuInfo.numBots); n++ ) {
00092 trap_GetConfigString( CS_PLAYERS + removeBotsMenuInfo.botClientNums[removeBotsMenuInfo.baseBotNum + n], info, MAX_INFO_STRING );
00093 Q_strncpyz( removeBotsMenuInfo.botnames[n], Info_ValueForKey( info, "n" ), sizeof(removeBotsMenuInfo.botnames[n]) );
00094 Q_CleanStr( removeBotsMenuInfo.botnames[n] );
00095 }
00096
00097 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 148 of file ui_removebots.c. References removeBotsMenuInfo_t::baseBotNum, removeBotsMenuInfo, and UI_RemoveBotsMenu_SetBotNames(). 00148 {
00149 if (event != QM_ACTIVATED) {
00150 return;
00151 }
00152
00153 if( removeBotsMenuInfo.baseBotNum > 0 ) {
00154 removeBotsMenuInfo.baseBotNum--;
00155 UI_RemoveBotsMenu_SetBotNames();
00156 }
00157 }
|
Here is the call graph for this function:

|
|
Definition at line 79 of file ui_removebots.c. Referenced by UI_RemoveBotsMenu(), UI_RemoveBotsMenu_BotEvent(), UI_RemoveBotsMenu_DeleteEvent(), UI_RemoveBotsMenu_DownEvent(), UI_RemoveBotsMenu_GetBots(), UI_RemoveBotsMenu_Init(), UI_RemoveBotsMenu_SetBotNames(), and UI_RemoveBotsMenu_UpEvent(). |
1.3.9.1