UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cl_inventory_callbacks.cpp File Reference
#include "cl_inventory_callbacks.h"
#include "cl_shared.h"
#include "cl_inventory.h"
#include "ui/ui_main.h"
#include "ui/ui_nodes.h"
#include "cgame/cl_game.h"
#include "ui/ui_popup.h"

Go to the source code of this file.

Functions

static const char * CL_WeaponSkillToName (int weaponSkill)
 Translate a weaponSkill integer to a translated string. More...
 
void INV_ItemDescription (const objDef_t *od)
 Prints the description for items (weapons, armour, ...) More...
 
static void INV_IncreaseFiremode_f (void)
 Increases the number of the firemode to display. More...
 
static void INV_DecreaseFiremode_f (void)
 Decreases the number of the firemode to display. More...
 
static void INV_IncreaseItem_f (void)
 Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon) More...
 
static void INV_DecreaseItem_f (void)
 Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon) More...
 
static void INV_UpdateObject_f (void)
 Update the GUI with the selected item. More...
 
static void INV_UpdateActorLoad_f (void)
 Update the equipment weight for the selected actor. More...
 
void INV_InitCallbacks (void)
 

Variables

static const objDef_tcurrentDisplayedObject
 
static int itemIndex
 
static int fireModeIndex
 

Function Documentation

static const char* CL_WeaponSkillToName ( int  weaponSkill)
static

Translate a weaponSkill integer to a translated string.

Definition at line 40 of file cl_inventory_callbacks.cpp.

References _, SKILL_ASSAULT, SKILL_CLOSE, SKILL_EXPLOSIVE, SKILL_HEAVY, and SKILL_SNIPER.

Referenced by INV_ItemDescription().

static void INV_DecreaseFiremode_f ( void  )
static

Decreases the number of the firemode to display.

See also
UP_ItemDescription

Definition at line 244 of file cl_inventory_callbacks.cpp.

References fireModeIndex, and INV_ItemDescription().

Referenced by INV_InitCallbacks().

static void INV_DecreaseItem_f ( void  )
static

Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon)

See also
UP_ItemDescription

Definition at line 289 of file cl_inventory_callbacks.cpp.

References objDef_s::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_s::numAmmos, objDef_s::numWeapons, and objDef_s::weapons.

Referenced by INV_InitCallbacks().

static void INV_IncreaseFiremode_f ( void  )
static

Increases the number of the firemode to display.

See also
UP_ItemDescription

Definition at line 230 of file cl_inventory_callbacks.cpp.

References fireModeIndex, and INV_ItemDescription().

Referenced by INV_InitCallbacks().

static void INV_IncreaseItem_f ( void  )
static

Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon)

See also
UP_ItemDescription

Definition at line 258 of file cl_inventory_callbacks.cpp.

References objDef_s::ammos, currentDisplayedObject, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_s::numAmmos, objDef_s::numWeapons, and objDef_s::weapons.

Referenced by INV_InitCallbacks().

void INV_ItemDescription ( const objDef_t od)
static void INV_UpdateObject_f ( void  )
static

Variable Documentation

const objDef_t* currentDisplayedObject
static

Definition at line 33 of file cl_inventory_callbacks.cpp.

Referenced by INV_DecreaseItem_f(), and INV_IncreaseItem_f().

int fireModeIndex
static
int itemIndex
static