Menu related callback functions for the team menu. More...
#include "../cl_shared.h"
#include "../cl_team.h"
#include "../ui/ui_main.h"
#include "../ui/node/ui_node_container.h"
#include "cp_campaign.h"
#include "cp_team.h"
#include "cp_team_callbacks.h"
Go to the source code of this file.
Functions | |
static qboolean | CL_UpdateEmployeeList (employeeType_t employeeType, char *nodeTag, int beginIndex, int drawableListSize) |
static void | CL_UpdateSoldierList_f (void) |
Init the teamlist checkboxes. | |
static void | CL_UpdatePilotList_f (void) |
Init the teamlist checkboxes. | |
static void | CL_UpdateEquipmentMenuParameters_f (void) |
Displays actor equipment and unused items in proper (filter) category. | |
static void | CL_AssignPilot_f (void) |
Adds or removes a pilot to/from an aircraft. | |
static void | CL_AssignSoldier_f (void) |
Adds or removes a soldier to/from an aircraft. | |
static void | CL_ActorPilotSelect_f (void) |
static void | CL_ActorTeamSelect_f (void) |
void | CP_TEAM_InitCallbacks (void) |
void | CP_TEAM_ShutdownCallbacks (void) |
Variables | |
linkedList_t * | employeeList |
int | employeesInCurrentList |
static int | soldierListSize = 0 |
static int | soldierListPos = 0 |
Menu related callback functions for the team menu.
Definition in file cp_team_callbacks.c.
static void CL_ActorPilotSelect_f | ( | void | ) | [static] |
Definition at line 331 of file cp_team_callbacks.c.
References B_GetCurrentSelectedBase(), employee_s::chr, CL_UpdateCharacterValues(), Cmd_Argc(), Cmd_Argv(), Com_Error(), Com_Printf(), Cvar_ForceSet(), E_CountHired(), E_GetEmployeeByMenuIndex(), EMPL_PILOT, ERR_DROP, base_s::idx, soldierListPos, soldierListSize, UI_ExecuteConfunc(), and va().
Referenced by CP_TEAM_InitCallbacks().
static void CL_ActorTeamSelect_f | ( | void | ) | [static] |
Definition at line 372 of file cp_team_callbacks.c.
References B_GetCurrentSelectedBase(), employee_s::chr, CL_UpdateCharacterValues(), Cmd_Argc(), Cmd_Argv(), Com_Error(), Com_Printf(), Cvar_ForceSet(), E_CountHired(), E_GetEmployeeByMenuIndex(), EMPL_SOLDIER, ERR_DROP, base_s::idx, soldierListPos, soldierListSize, UI_ExecuteConfunc(), and va().
Referenced by CP_TEAM_InitCallbacks().
static void CL_AssignPilot_f | ( | void | ) | [static] |
Adds or removes a pilot to/from an aircraft.
Definition at line 245 of file cp_team_callbacks.c.
References base_s::aircraftCurrent, B_GetCurrentSelectedBase(), CL_UpdateActorAircraftVar(), Cmd_Argc(), Cmd_Argv(), Cmd_ExecuteString(), Com_Error(), Com_Printf(), E_CountHired(), E_GetEmployeeByMenuIndex(), EMPL_PILOT, ERR_DROP, base_s::idx, aircraft_s::pilot, UI_ExecuteConfunc(), and va().
Referenced by CP_TEAM_InitCallbacks().
static void CL_AssignSoldier_f | ( | void | ) | [static] |
Adds or removes a soldier to/from an aircraft.
Definition at line 295 of file cp_team_callbacks.c.
References AIM_AddEmployeeFromMenu(), base_s::aircraftCurrent, B_GetCurrentSelectedBase(), Cbuf_AddText(), CL_UpdateActorAircraftVar(), Cmd_Argc(), Cmd_Argv(), Com_Printf(), E_CountHired(), EMPL_SOLDIER, UI_ExecuteConfunc(), and va().
Referenced by CP_TEAM_InitCallbacks().
static qboolean CL_UpdateEmployeeList | ( | employeeType_t | employeeType, | |
char * | nodeTag, | |||
int | beginIndex, | |||
int | drawableListSize | |||
) | [static] |
Definition at line 46 of file cp_team_callbacks.c.
References AIR_IsEmployeeInAircraft(), base_s::aircraftCurrent, B_GetCurrentSelectedBase(), employee_s::chr, CL_UpdateActorAircraftVar(), Com_Printf(), CONTAINER, csi, Cvar_GetInteger(), Cvar_Set(), linkedList_s::data, E_GetHiredEmployees(), E_IsHired, employeesInCurrentList, aircraft_s::homebase, id, INVDEF, character_s::name, linkedList_s::next, csi_s::numIDs, qfalse, qtrue, soldierListPos, soldierListSize, employee_s::transfer, UI_ExecuteConfunc(), and va().
Referenced by CL_UpdatePilotList_f(), and CL_UpdateSoldierList_f().
static void CL_UpdateEquipmentMenuParameters_f | ( | void | ) | [static] |
Displays actor equipment and unused items in proper (filter) category.
Definition at line 194 of file cp_team_callbacks.c.
References AIR_GetNextFromBase(), AIR_GetTeamSize(), base_s::aircraftCurrent, B_GetCurrentSelectedBase(), base_s::bEquipment, chr_list_s::chr, chrDisplayList, CL_CleanTempInventory(), CL_CleanupAircraftCrew(), CL_UpdateActorAircraftVar(), Cvar_ForceSet(), EMPL_SOLDIER, aircraft_s::homebase, character_s::i, MAX_ACTIVETEAM, qfalse, base_s::storage, UI_ContainerNodeUpdateEquipment(), UI_ExecuteConfunc(), ui_inventory, and UI_PopWindow().
Referenced by CP_TEAM_InitCallbacks().
static void CL_UpdatePilotList_f | ( | void | ) | [static] |
Init the teamlist checkboxes.
Definition at line 171 of file cp_team_callbacks.c.
References CL_UpdateEmployeeList(), Cmd_Argc(), Cmd_Argv(), Com_Printf(), EMPL_PILOT, qfalse, and UI_PopWindow().
Referenced by CP_TEAM_InitCallbacks().
static void CL_UpdateSoldierList_f | ( | void | ) | [static] |
Init the teamlist checkboxes.
Definition at line 147 of file cp_team_callbacks.c.
References CL_UpdateEmployeeList(), Cmd_Argc(), Cmd_Argv(), Com_Printf(), EMPL_SOLDIER, qfalse, and UI_PopWindow().
Referenced by CP_TEAM_InitCallbacks().
void CP_TEAM_InitCallbacks | ( | void | ) |
Definition at line 441 of file cp_team_callbacks.c.
References CL_ActorPilotSelect_f(), CL_ActorTeamSelect_f(), CL_AssignPilot_f(), CL_AssignSoldier_f(), CL_UpdateEquipmentMenuParameters_f(), CL_UpdatePilotList_f(), CL_UpdateSoldierList_f(), Cmd_AddCommand(), soldierListPos, and soldierListSize.
Referenced by CP_AddCampaignCallbackCommands().
void CP_TEAM_ShutdownCallbacks | ( | void | ) |
Definition at line 459 of file cp_team_callbacks.c.
References Cmd_RemoveCommand().
Referenced by CP_RemoveCampaignCallbackCommands().
< ui_inventory
Definition at line 35 of file cp_team_callbacks.c.
Definition at line 36 of file cp_team_callbacks.c.
int soldierListPos = 0 [static] |
Definition at line 44 of file cp_team_callbacks.c.
Referenced by CL_ActorPilotSelect_f(), CL_ActorTeamSelect_f(), CL_UpdateEmployeeList(), and CP_TEAM_InitCallbacks().
int soldierListSize = 0 [static] |
Definition at line 43 of file cp_team_callbacks.c.
Referenced by CL_ActorPilotSelect_f(), CL_ActorTeamSelect_f(), CL_UpdateEmployeeList(), and CP_TEAM_InitCallbacks().