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

Go to the source code of this file.
Data Structures | |
| struct | addBotsMenuInfo_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_FIGHT0 "menu/art/accept_0" |
| #define | ART_FIGHT1 "menu/art/accept_1" |
| #define | ID_BACK 10 |
| #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_DOWN 14 |
| #define | ID_GO 11 |
| #define | ID_LIST 12 |
| #define | ID_SKILL 15 |
| #define | ID_TEAM 16 |
| #define | ID_UP 13 |
Functions | |
| void | UI_AddBots_Cache (void) |
| void | UI_AddBotsMenu (void) |
| void | UI_AddBotsMenu_BackEvent (void *ptr, int event) |
| void | UI_AddBotsMenu_BotEvent (void *ptr, int event) |
| void | UI_AddBotsMenu_DownEvent (void *ptr, int event) |
| void | UI_AddBotsMenu_Draw (void) |
| void | UI_AddBotsMenu_FightEvent (void *ptr, int event) |
| void | UI_AddBotsMenu_GetSortedBotNums (void) |
| void | UI_AddBotsMenu_Init (void) |
| void | UI_AddBotsMenu_SetBotNames (void) |
| int QDECL | UI_AddBotsMenu_SortCompare (const void *arg1, const void *arg2) |
| void | UI_AddBotsMenu_UpEvent (void *ptr, int event) |
Variables | |
| addBotsMenuInfo_t | addBotsMenuInfo |
| const char * | skillNames [] |
| const char * | teamNames1 [] |
| const char * | teamNames2 [] |
|
|
Definition at line 42 of file ui_addbots.c. Referenced by UI_AddBots_Cache(). |
|
|
Definition at line 40 of file ui_addbots.c. Referenced by Demos_Cache(), UI_AddBots_Cache(), and UI_LoadConfig_Cache(). |
|
|
Definition at line 41 of file ui_addbots.c. Referenced by UI_AddBots_Cache(). |
|
|
|
|
Definition at line 39 of file ui_addbots.c. Referenced by UI_AddBots_Cache(), UI_AddBotsMenu_Draw(), UI_RemoveBots_Cache(), and UI_SaveConfigMenu_Cache(). |
|
|
Definition at line 37 of file ui_addbots.c. Referenced by UI_AddBots_Cache(), UI_LoadConfig_Cache(), UI_ModsMenu_Cache(), and UI_SPLevelMenu_Cache(). |
|
|
Definition at line 38 of file ui_addbots.c. Referenced by UI_AddBots_Cache(), UI_LoadConfig_Cache(), UI_ModsMenu_Cache(), and UI_SPLevelMenu_Cache(). |
|
|
|
Definition at line 51 of file ui_addbots.c. Referenced by UI_AddBotsMenu_Init(), and UI_RemoveBotsMenu_Init(). |
|
|
Definition at line 52 of file ui_addbots.c. |
|
|
Definition at line 53 of file ui_addbots.c. |
|
|
Definition at line 54 of file ui_addbots.c. |
|
|
Definition at line 55 of file ui_addbots.c. |
|
|
Definition at line 56 of file ui_addbots.c. |
|
|
Definition at line 57 of file ui_addbots.c. |
|
|
Definition at line 48 of file ui_addbots.c. |
|
|
Definition at line 45 of file ui_addbots.c. Referenced by Demos_MenuEvent(), LoadConfig_MenuEvent(), ServerOptions_Event(), and UI_Mods_MenuEvent(). |
|
|
Definition at line 46 of file ui_addbots.c. Referenced by ArenaServers_Event(), and GraphicsOptions_Event(). |
|
|
Definition at line 49 of file ui_addbots.c. |
|
|
Definition at line 50 of file ui_addbots.c. Referenced by InGame_Event(). |
|
|
Definition at line 47 of file ui_addbots.c. |
|
|
Definition at line 392 of file ui_addbots.c. References ART_ARROWDOWN, ART_ARROWS, ART_ARROWUP, ART_BACK0, ART_BACK1, ART_BACKGROUND, ART_FIGHT0, ART_FIGHT1, and trap_R_RegisterShaderNoMip(). Referenced by UI_AddBotsMenu_Init(), and UI_Cache_f(). 00392 {
00393 trap_R_RegisterShaderNoMip( ART_BACK0 );
00394 trap_R_RegisterShaderNoMip( ART_BACK1 );
00395 trap_R_RegisterShaderNoMip( ART_FIGHT0 );
00396 trap_R_RegisterShaderNoMip( ART_FIGHT1 );
00397 trap_R_RegisterShaderNoMip( ART_BACKGROUND );
00398 trap_R_RegisterShaderNoMip( ART_ARROWS );
00399 trap_R_RegisterShaderNoMip( ART_ARROWUP );
00400 trap_R_RegisterShaderNoMip( ART_ARROWDOWN );
00401 }
|
Here is the call graph for this function:

|
|
Definition at line 409 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::menu, UI_AddBotsMenu_Init(), and UI_PushMenu(). Referenced by InGame_Event(). 00409 {
00410 UI_AddBotsMenu_Init();
00411 UI_PushMenu( &addBotsMenuInfo.menu );
00412 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 126 of file ui_addbots.c. References UI_PopMenu(). 00126 {
00127 if (event != QM_ACTIVATED) {
00128 return;
00129 }
00130 UI_PopMenu();
00131 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 110 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::bots, menutext_s::color, and addBotsMenuInfo_t::selectedBotNum. 00110 {
00111 if (event != QM_ACTIVATED) {
00112 return;
00113 }
00114
00115 addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = color_orange;
00116 addBotsMenuInfo.selectedBotNum = ((menucommon_s*)ptr)->id - ID_BOTNAME0;
00117 addBotsMenuInfo.bots[addBotsMenuInfo.selectedBotNum].color = color_white;
00118 }
|
|
||||||||||||
|
Definition at line 173 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::baseBotNum, addBotsMenuInfo_t::numBots, and UI_AddBotsMenu_SetBotNames(). 00173 {
00174 if (event != QM_ACTIVATED) {
00175 return;
00176 }
00177
00178 if( addBotsMenuInfo.baseBotNum + 7 < addBotsMenuInfo.numBots ) {
00179 addBotsMenuInfo.baseBotNum++;
00180 UI_AddBotsMenu_SetBotNames();
00181 }
00182 }
|
Here is the call graph for this function:

|
|
Definition at line 224 of file ui_addbots.c. References addBotsMenuInfo, ART_BACKGROUND, color_white, addBotsMenuInfo_t::menu, Menu_Draw(), UI_CENTER, UI_DrawBannerString(), and UI_DrawNamedPic(). 00224 {
00225 UI_DrawBannerString( 320, 16, "ADD BOTS", UI_CENTER, color_white );
00226 UI_DrawNamedPic( 320-233, 240-166, 466, 332, ART_BACKGROUND );
00227
00228 // standard menu drawing
00229 Menu_Draw( &addBotsMenuInfo.menu );
00230 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 87 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::botnames, menulist_s::curvalue, addBotsMenuInfo_t::delay, EXEC_APPEND, menulist_s::itemnames, addBotsMenuInfo_t::selectedBotNum, addBotsMenuInfo_t::skill, addBotsMenuInfo_t::team, trap_Cmd_ExecuteText(), and va(). 00087 {
00088 const char *team;
00089 int skill;
00090
00091 if (event != QM_ACTIVATED) {
00092 return;
00093 }
00094
00095 team = addBotsMenuInfo.team.itemnames[addBotsMenuInfo.team.curvalue];
00096 skill = addBotsMenuInfo.skill.curvalue + 1;
00097
00098 trap_Cmd_ExecuteText( EXEC_APPEND, va("addbot %s %i %s %i\n",
00099 addBotsMenuInfo.botnames[addBotsMenuInfo.selectedBotNum], skill, team, addBotsMenuInfo.delay) );
00100
00101 addBotsMenuInfo.delay += 1500;
00102 }
|
Here is the call graph for this function:

|
|
Definition at line 207 of file ui_addbots.c. References addBotsMenuInfo, n, addBotsMenuInfo_t::numBots, qsort(), addBotsMenuInfo_t::sortedBotNums, and UI_AddBotsMenu_SortCompare(). Referenced by UI_AddBotsMenu_Init(). 00207 {
00208 int n;
00209
00210 // initialize the array
00211 for( n = 0; n < addBotsMenuInfo.numBots; n++ ) {
00212 addBotsMenuInfo.sortedBotNums[n] = n;
00213 }
00214
00215 qsort( addBotsMenuInfo.sortedBotNums, addBotsMenuInfo.numBots, sizeof(addBotsMenuInfo.sortedBotNums[0]), UI_AddBotsMenu_SortCompare );
00216 }
|
Here is the call graph for this function:

|
Here is the call graph for this function:

|
|
Definition at line 139 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::baseBotNum, addBotsMenuInfo_t::botnames, Info_ValueForKey(), n, Q_strncpyz(), addBotsMenuInfo_t::sortedBotNums, and UI_GetBotInfoByNumber(). Referenced by UI_AddBotsMenu_DownEvent(), UI_AddBotsMenu_Init(), and UI_AddBotsMenu_UpEvent(). 00139 {
00140 int n;
00141 const char *info;
00142
00143 for ( n = 0; n < 7; n++ ) {
00144 info = UI_GetBotInfoByNumber( addBotsMenuInfo.sortedBotNums[addBotsMenuInfo.baseBotNum + n] );
00145 Q_strncpyz( addBotsMenuInfo.botnames[n], Info_ValueForKey( info, "name" ), sizeof(addBotsMenuInfo.botnames[n]) );
00146 }
00147
00148 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 190 of file ui_addbots.c. References Info_ValueForKey(), Q_stricmp(), QDECL, and UI_GetBotInfoByNumber(). Referenced by UI_AddBotsMenu_GetSortedBotNums(). 00190 {
00191 int num1, num2;
00192 const char *info1, *info2;
00193 const char *name1, *name2;
00194
00195 num1 = *(int *)arg1;
00196 num2 = *(int *)arg2;
00197
00198 info1 = UI_GetBotInfoByNumber( num1 );
00199 info2 = UI_GetBotInfoByNumber( num2 );
00200
00201 name1 = Info_ValueForKey( info1, "name" );
00202 name2 = Info_ValueForKey( info2, "name" );
00203
00204 return Q_stricmp( name1, name2 );
00205 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 156 of file ui_addbots.c. References addBotsMenuInfo, addBotsMenuInfo_t::baseBotNum, and UI_AddBotsMenu_SetBotNames(). 00156 {
00157 if (event != QM_ACTIVATED) {
00158 return;
00159 }
00160
00161 if( addBotsMenuInfo.baseBotNum > 0 ) {
00162 addBotsMenuInfo.baseBotNum--;
00163 UI_AddBotsMenu_SetBotNames();
00164 }
00165 }
|
Here is the call graph for this function:

|
|
Definition at line 79 of file ui_addbots.c. Referenced by UI_AddBotsMenu(), UI_AddBotsMenu_BotEvent(), UI_AddBotsMenu_DownEvent(), UI_AddBotsMenu_Draw(), UI_AddBotsMenu_FightEvent(), UI_AddBotsMenu_GetSortedBotNums(), UI_AddBotsMenu_Init(), UI_AddBotsMenu_SetBotNames(), and UI_AddBotsMenu_UpEvent(). |
|
|
Initial value: {
"I Can Win",
"Bring It On",
"Hurt Me Plenty",
"Hardcore",
"Nightmare!",
0
}
Definition at line 238 of file ui_addbots.c. |
|
|
Initial value: {
"Free",
0
}
Definition at line 247 of file ui_addbots.c. |
|
|
Initial value: {
"Red",
"Blue",
0
}
Definition at line 252 of file ui_addbots.c. |
1.3.9.1