#include "client.h"
#include "cl_inventory.h"
#include "cl_inventory_callbacks.h"
#include "ui/ui_main.h"
#include "ui/ui_nodes.h"
#include "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. | |
void | INV_ItemDescription (const objDef_t *od) |
Prints the description for items (weapons, armour, ...). | |
static void | INV_IncreaseFiremode_f (void) |
Increases the number of the firemode to display. | |
static void | INV_DecreaseFiremode_f (void) |
Decreases the number of the firemode to display. | |
static void | INV_IncreaseItem_f (void) |
Increases the number of the weapon to display (for ammo) or the ammo to display (for weapon). | |
static void | INV_DecreaseItem_f (void) |
Decreases the number of the firemode to display (for ammo) or the ammo to display (for weapon). | |
static void | INV_UpdateObject_f (void) |
Update the GUI with the selected item. | |
void | INV_InitCallbacks (void) |
Variables | |
static const objDef_t * | currentDisplayedObject |
static int | itemIndex |
static int | fireModeIndex |
Definition in file cl_inventory_callbacks.c.
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.c.
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.
Definition at line 223 of file cl_inventory_callbacks.c.
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).
Definition at line 268 of file cl_inventory_callbacks.c.
References objDef_s::ammos, 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.
Definition at line 209 of file cl_inventory_callbacks.c.
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).
Definition at line 237 of file cl_inventory_callbacks.c.
References objDef_s::ammos, GAME_ItemIsUseable(), INV_ItemDescription(), itemIndex, objDef_s::numAmmos, objDef_s::numWeapons, and objDef_s::weapons.
Referenced by INV_InitCallbacks().
void INV_InitCallbacks | ( | void | ) |
Definition at line 336 of file cl_inventory_callbacks.c.
References _, Cmd_AddCommand(), INV_DecreaseFiremode_f(), INV_DecreaseItem_f(), INV_IncreaseFiremode_f(), INV_IncreaseItem_f(), and INV_UpdateObject_f().
Referenced by INV_InitStartup().
void INV_ItemDescription | ( | const objDef_t * | od | ) |
Prints the description for items (weapons, armour, ...).
[in] | od | The object definition of the item |
od->isDummy
here somewhere? Definition at line 65 of file cl_inventory_callbacks.c.
References _, objDef_s::ammo, objDef_s::ammos, CL_WeaponSkillToName(), Com_sprintf(), count, csi, Cvar_ForceSet(), Cvar_Set(), fireDef_s::damage, csi_s::dts, objDef_s::fd, fireModeIndex, objDef_s::fireTwoHanded, GAME_ItemIsUseable(), i, damageType_s::id, objDef_s::id, INV_IsAmmo, INV_IsArmour, itemIndex, fireDef_s::name, objDef_s::name, objDef_s::numAmmos, csi_s::numDTs, objDef_s::numFiredefs, objDef_s::numWeapons, Q_strcat(), fireDef_s::range, objDef_s::ratings, objDef_s::reload, fireDef_s::shots, damageType_s::showInMenu, objDef_s::size, fireDef_s::spldmg, fireDef_s::spread, TEXT_ITEMDESCRIPTION, fireDef_s::time, UI_ExecuteConfunc(), UI_MAX_SMALLTEXTLEN, UI_RegisterText(), UI_ResetData(), UNIT_SIZE, va(), objDef_s::weapon, objDef_s::weapons, and fireDef_s::weaponSkill.
Referenced by BS_BuyItem_f(), BS_BuyType(), BS_MarketClick_f(), BS_SellItem_f(), INV_DecreaseFiremode_f(), INV_DecreaseItem_f(), INV_IncreaseFiremode_f(), INV_IncreaseItem_f(), INV_UpdateObject_f(), UP_AircraftDescription(), UP_AircraftItemDescription(), UP_Article(), and UP_UGVDescription().
static void INV_UpdateObject_f | ( | void | ) | [static] |
Update the GUI with the selected item.
Definition at line 298 of file cl_inventory_callbacks.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), csi, Cvar_FindVar(), Cvar_SetValue(), cvar_s::integer, INV_GetFilterFromItem(), INV_ItemDescription(), INVSH_GetItemByIDX(), csi_s::numODs, qtrue, and UI_ExecuteConfunc().
Referenced by INV_InitCallbacks().
const objDef_t* currentDisplayedObject [static] |
Definition at line 33 of file cl_inventory_callbacks.c.
int fireModeIndex [static] |
Definition at line 35 of file cl_inventory_callbacks.c.
Referenced by INV_DecreaseFiremode_f(), INV_IncreaseFiremode_f(), and INV_ItemDescription().
int itemIndex [static] |
Definition at line 34 of file cl_inventory_callbacks.c.
Referenced by INV_DecreaseItem_f(), INV_IncreaseItem_f(), and INV_ItemDescription().