cp_installation_callbacks.c File Reference

Menu related console command callbacks. More...

#include "../cl_shared.h"
#include "../ui/ui_main.h"
#include "cp_campaign.h"
#include "cp_installation_callbacks.h"
#include "cp_installation.h"
#include "cp_map.h"
#include "../ui/ui_popup.h"
Include dependency graph for cp_installation_callbacks.c:

Go to the source code of this file.

Functions

static void INS_SetInstallationTitle (void)
 Sets the title of the installation to a cvar to prepare the rename menu.
void INS_SelectInstallation (installation_t *installation)
 Select an installation when clicking on it on geoscape, or build a new installation.
static void INS_BuildInstallation_f (void)
 Constructs a new installation.
static void INS_SelectInstallation_f (void)
 Called when an installation is opened or a new installation is created on geoscape. For a new installation the installationID is -1.
static void INS_ChangeInstallationName_f (void)
 Creates console command to change the name of a installation. Copies the value of the cvar mn_installation_title over as the name of the current selected installation.
static void INS_DestroyInstallation_f (void)
 console function for destroying an installation
static void INS_UpdateInsatallationLimit_f (void)
 updates the installation limit cvar for menus
void INS_InitCallbacks (void)
void INS_ShutdownCallbacks (void)

Detailed Description

Menu related console command callbacks.

Definition in file cp_installation_callbacks.c.


Function Documentation

static void INS_BuildInstallation_f ( void   )  [static]
static void INS_ChangeInstallationName_f ( void   )  [static]

Creates console command to change the name of a installation. Copies the value of the cvar mn_installation_title over as the name of the current selected installation.

Definition at line 185 of file cp_installation_callbacks.c.

References Cvar_GetString(), INS_GetCurrentSelectedInstallation(), installation_s::name, and Q_strncpyz().

Referenced by INS_InitCallbacks().

static void INS_DestroyInstallation_f ( void   )  [static]
void INS_InitCallbacks ( void   ) 
void INS_SelectInstallation ( installation_t installation  ) 

Select an installation when clicking on it on geoscape, or build a new installation.

Parameters:
[in] installation If this is NULL we want to build a new installation
Note:
This is (and should be) the only place where installationCurrent is set to a value that is not NULL

Definition at line 64 of file cp_installation_callbacks.c.

References B_GetInstallationLimit(), installation_s::buildStart, installationTemplate_s::buildTime, ccs, Com_DPrintf(), Cvar_Set(), ccs_s::date, date_s::day, DEBUG_CLIENT, installation_s::idx, INS_SetCurrentSelectedInstallation(), INS_SetInstallationTitle(), INSTALLATION_WORKING, installation_s::installationStatus, installation_s::installationTemplate, MA_NEWINSTALLATION, MA_NONE, MAP_IsRadarOverlayActivated(), MAP_ResetAction(), MAP_SetOverlay(), ccs_s::mapAction, ngettext, ccs_s::numInstallations, UI_PushWindow(), and va().

Referenced by INS_SelectInstallation_f(), and MAP_MultiSelectExecuteAction_f().

static void INS_SelectInstallation_f ( void   )  [static]

Called when an installation is opened or a new installation is created on geoscape. For a new installation the installationID is -1.

Definition at line 161 of file cp_installation_callbacks.c.

References ccs, Cmd_Argc(), Cmd_Argv(), Com_Printf(), INS_GetFoundedInstallationByIDX(), INS_SelectInstallation(), and ccs_s::numInstallations.

Referenced by INS_InitCallbacks().

static void INS_SetInstallationTitle ( void   )  [static]
void INS_ShutdownCallbacks ( void   ) 

Definition at line 250 of file cp_installation_callbacks.c.

References Cmd_RemoveCommand(), and Cvar_Delete().

Referenced by CP_RemoveCampaignCallbackCommands().

static void INS_UpdateInsatallationLimit_f ( void   )  [static]

updates the installation limit cvar for menus

Definition at line 231 of file cp_installation_callbacks.c.

References B_GetInstallationLimit(), and Cvar_SetValue().

Referenced by INS_InitCallbacks().


Generated by  doxygen 1.6.2