#include "../cl_shared.h"
#include "../cl_team.h"
#include "../ui/ui_main.h"
#include "../ui/ui_popup.h"
#include "cp_campaign.h"
#include "cp_hospital.h"
#include "cp_hospital_callbacks.h"
Go to the source code of this file.
Defines | |
#define | HOS_MENU_MAX_ENTRIES 21 |
Maximal entries in hospital menu. | |
#define | HOS_MENU_LINE_ENTRIES 3 |
Number of entries in a line of the hospital menu. | |
Functions | |
static void | HOS_UpdateMenu (void) |
Updates the hospital menu. | |
static void | HOS_Init_f (void) |
Script command to init the hospital menu. | |
static void | HOS_ListUp_f (void) |
Click function for scrolling up the employee list. | |
static void | HOS_ListDown_f (void) |
Click function for scrolling down the employee list. | |
static void | HOS_ListClick_f (void) |
Click function for hospital menu employee list. | |
static void | HOS_EmployeeInit_f (void) |
This is the init function for the hospital_employee menu. | |
void | HOS_InitCallbacks (void) |
void | HOS_ShutdownCallbacks (void) |
Variables | |
static employee_t * | currentEmployeeInHospital = NULL |
This is the current selected employee for the hospital_employee menu. | |
static int | hospitalFirstEntry |
First line in Hospital menu. | |
static int | hospitalNumEntries |
Number of all entries in Hospital menu. |
Definition in file cp_hospital_callbacks.c.
#define HOS_MENU_LINE_ENTRIES 3 |
Number of entries in a line of the hospital menu.
Definition at line 46 of file cp_hospital_callbacks.c.
Referenced by HOS_ListDown_f(), and HOS_ListUp_f().
#define HOS_MENU_MAX_ENTRIES 21 |
Maximal entries in hospital menu.
Definition at line 43 of file cp_hospital_callbacks.c.
Referenced by HOS_ListDown_f(), and HOS_UpdateMenu().
static void HOS_EmployeeInit_f | ( | void | ) | [static] |
This is the init function for the hospital_employee menu.
Definition at line 213 of file cp_hospital_callbacks.c.
References employee_s::chr, CL_UpdateCharacterValues(), Com_Printf(), Cvar_SetValue(), character_s::HP, character_s::maxHP, TEXT_STANDARD, and UI_ResetData().
Referenced by HOS_InitCallbacks().
static void HOS_Init_f | ( | void | ) | [static] |
Script command to init the hospital menu.
Definition at line 124 of file cp_hospital_callbacks.c.
References B_GetBuildingStatus(), B_GetCurrentSelectedBase(), B_HOSPITAL, HOS_UpdateMenu(), hospitalFirstEntry, qfalse, and UI_PopWindow().
Referenced by HOS_InitCallbacks().
void HOS_InitCallbacks | ( | void | ) |
Definition at line 232 of file cp_hospital_callbacks.c.
References Cmd_AddCommand(), HOS_EmployeeInit_f(), HOS_Init_f(), HOS_ListClick_f(), HOS_ListDown_f(), and HOS_ListUp_f().
Referenced by CP_AddCampaignCallbackCommands().
static void HOS_ListClick_f | ( | void | ) | [static] |
Click function for hospital menu employee list.
Definition at line 167 of file cp_hospital_callbacks.c.
References B_GetCurrentSelectedBase(), employee_s::chr, Cmd_Argc(), Cmd_Argv(), Com_Printf(), E_GetNextFromBase(), E_IsAwayFromBase(), hospitalFirstEntry, character_s::HP, MAX_EMPL, character_s::maxHP, type, and UI_PushWindow().
Referenced by HOS_InitCallbacks().
static void HOS_ListDown_f | ( | void | ) | [static] |
Click function for scrolling down the employee list.
Definition at line 156 of file cp_hospital_callbacks.c.
References HOS_MENU_LINE_ENTRIES, HOS_MENU_MAX_ENTRIES, HOS_UpdateMenu(), hospitalFirstEntry, and hospitalNumEntries.
Referenced by HOS_InitCallbacks().
static void HOS_ListUp_f | ( | void | ) | [static] |
Click function for scrolling up the employee list.
Definition at line 145 of file cp_hospital_callbacks.c.
References HOS_MENU_LINE_ENTRIES, HOS_UpdateMenu(), and hospitalFirstEntry.
Referenced by HOS_InitCallbacks().
void HOS_ShutdownCallbacks | ( | void | ) |
Definition at line 241 of file cp_hospital_callbacks.c.
References Cmd_RemoveCommand().
Referenced by CP_RemoveCampaignCallbackCommands().
static void HOS_UpdateMenu | ( | void | ) | [static] |
Updates the hospital menu.
Definition at line 52 of file cp_hospital_callbacks.c.
References _, B_GetCurrentSelectedBase(), employee_s::chr, CL_GetRankByIdx(), Com_DPrintf(), Cvar_Set(), DEBUG_CLIENT, E_GetEmployeeString(), E_GetNextFromBase(), E_IsAwayFromBase(), EMPL_SOLDIER, HOS_MENU_MAX_ENTRIES, hospitalFirstEntry, hospitalNumEntries, character_s::HP, employee_s::idx, MAX_EMPL, character_s::maxHP, rank_s::name, character_s::name, name, Q_strncpyz(), chrScoreGlobal_s::rank, character_s::score, employee_s::type, type, UI_ExecuteConfunc(), and va().
Referenced by HOS_Init_f(), HOS_ListDown_f(), and HOS_ListUp_f().
employee_t* currentEmployeeInHospital = NULL [static] |
This is the current selected employee for the hospital_employee menu.
Definition at line 34 of file cp_hospital_callbacks.c.
int hospitalFirstEntry [static] |
First line in Hospital menu.
Definition at line 37 of file cp_hospital_callbacks.c.
Referenced by HOS_Init_f(), HOS_ListClick_f(), HOS_ListDown_f(), HOS_ListUp_f(), and HOS_UpdateMenu().
int hospitalNumEntries [static] |
Number of all entries in Hospital menu.
Definition at line 40 of file cp_hospital_callbacks.c.
Referenced by HOS_ListDown_f(), and HOS_UpdateMenu().