Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
inventory.c File Reference

Go to the source code of this file.

Enumerations

enum  Direction { RIGHT , LEFT , UP , DOWN }

Functions

void AddQuickbarItem (InventoryItem item, int index)
int AngleToDirection (int angle)
bool Controller (Widget w, int control, int value)
void Deserialize ()
void DisableMicromanagement ()
void DraggingOverCenterPanel (Widget w, int x, int y, Widget receiver)
void DraggingOverHandsPanel (Widget w, int x, int y, Widget receiver)
void DraggingOverLeftPanel (Widget w, int x, int y, Widget receiver)
void DraggingOverRightPanel (Widget w, int x, int y, Widget receiver)
void EnableMicromanagement ()
Container GetFocusedArea ()
static Inventory GetInstance ()
static int GetPlayerAttachmentIndex (int slot_id)
static int GetPlayerAttachmentIndex (string slot_name)
int GetProperControllerStickAngle (int angle)
string GetStringVariant (string pInputAction, notnull array< string > variants)
 Picks from the strings by active input limiter variant in order: {click,hold,doubleclick}. Intended for inputs that check 'LocalPress' exclusively!!
void Init ()
void InitDragAndDropEvents ()
void InitInputWrapperData ()
void Inventory (LayoutHolder parent)
void InventoryMovementButtonTickHandler (float timeslice)
void LoadPlayerAttachmentIndexes ()
static void MoveAttachmentDown (int slot_id)
static void MoveAttachmentUp (int slot_id)
void MoveFocusByArea (int direction)
 Shifts between vicinity-hands-player.
void MoveFocusByContainer (int direction)
 Shifts between containers vertically.
void OnCenterPanelDropReceived (Widget w, int x, int y, Widget receiver)
void OnHandsPanelDropReceived (Widget w, int x, int y, Widget receiver)
override void OnHide ()
void OnInputDeviceChanged (EInputDeviceType pInputDeviceType)
void OnInputPresetChanged ()
void OnLeftPanelDropReceived (Widget w, int x, int y, Widget receiver)
void OnRightPanelDropReceived (Widget w, int x, int y, Widget receiver)
override void OnShow ()
override void Refresh ()
void RefreshQuickbar ()
void Reset ()
void ResetFocusedContainers ()
void Serialize ()
override void SetLayoutName ()
void TimerEnd ()
void Update (float timeslice)
void UpdateConsoleToolbar ()
override void UpdateInterval ()
void UpdateSpecialtyMeter ()

Variables

const float BT_REPEAT_DELAY = 0.35
const float BT_REPEAT_TIME = 0.09
const float BT_THRESHOLD_VALUE = 0.8
const int INV_MOV_DOWN = 3
const int INV_MOV_LEFT = 0
const int INV_MOV_RIGHT = 1
const int INV_MOV_UP = 2
Widget m_BottomConsoleToolbar
RichTextWidget m_BottomConsoleToolbarRichText
ref ContextMenu m_ContextMenu
int m_ControllerAngle
ref Timer m_ControllerRightStickTimer
bool m_ControllerRightStickTimerEnd = true
int m_ControllerTilt
bool m_HadFastTransferred
bool m_HadInspected
ref HandsArea m_HandsArea
bool m_HoldingQB
UAInput m_InpInp = null
static Inventory m_Instance
int m_InvInputActive = 0
ref array< stringm_InvInputNames = {"UAUILeftInventory","UAUIRightInventory","UAUIUpInventory","UAUIDownInventory"}
ref array< floatm_InvInputTimes
ref array< UAIDWrapperm_InvInputWrappers
int m_InvInputWrappersCount
UAInput m_InvUAInput
enum Direction m_LeftArea
bool m_NeedUpdateConsoleToolbar
static ref map< string, intm_PlayerAttachmentsIndexes
ref PlayerPreview m_PlayerPreview
InventoryItem m_QBHoveredItems
ref InventoryQuickbar m_Quickbar
Widget m_QuickbarWidget
ref RightArea m_RightArea
float m_SensitivityThreshold = 0.0
Widget m_SpecializationIcon
Widget m_SpecializationPanel
Widget m_TopConsoleToolbarEquipment
Widget m_TopConsoleToolbarHands
Widget m_TopConsoleToolbarVicinity

Enumeration Type Documentation

◆ Direction

enum Direction
Enumerator
RIGHT 
LEFT 
UP 
DOWN 

Definition at line 18 of file inventory.c.

Function Documentation

◆ AddQuickbarItem()

void AddQuickbarItem ( InventoryItem item,
int index )
protected

Definition at line 1131 of file inventory.c.

References g_Game, InventoryMenu(), and MENU_INVENTORY.

Referenced by UpdateInterval().

◆ AngleToDirection()

int AngleToDirection ( int angle)
protected

Definition at line 404 of file inventory.c.

Referenced by Controller().

◆ Controller()

◆ Deserialize()

void Deserialize ( )
protected

◆ DisableMicromanagement()

◆ DraggingOverCenterPanel()

◆ DraggingOverHandsPanel()

void DraggingOverHandsPanel ( Widget w,
int x,
int y,
Widget receiver )
protected

Definition at line 461 of file inventory.c.

References ItemManager::GetInstance(), ItemManager::HideDropzones(), m_HandsArea, x, and y.

◆ DraggingOverLeftPanel()

void DraggingOverLeftPanel ( Widget w,
int x,
int y,
Widget receiver )
protected

Definition at line 605 of file inventory.c.

References m_LeftArea, x, and y.

◆ DraggingOverRightPanel()

void DraggingOverRightPanel ( Widget w,
int x,
int y,
Widget receiver )
protected

Definition at line 610 of file inventory.c.

References m_RightArea, x, and y.

◆ EnableMicromanagement()

◆ GetFocusedArea()

Container GetFocusedArea ( )
protected

Definition at line 1374 of file inventory.c.

References m_HandsArea, m_LeftArea, and m_RightArea.

Referenced by UpdateConsoleToolbar().

◆ GetInstance()

Inventory GetInstance ( )
staticprotected

Definition at line 282 of file inventory.c.

References Inventory(), and m_Instance.

◆ GetPlayerAttachmentIndex() [1/2]

int GetPlayerAttachmentIndex ( int slot_id)
staticprotected

Definition at line 305 of file inventory.c.

References GetPlayerAttachmentIndex(), and InventorySlots::GetSlotName().

◆ GetPlayerAttachmentIndex() [2/2]

int GetPlayerAttachmentIndex ( string slot_name)
staticprotected

◆ GetProperControllerStickAngle()

int GetProperControllerStickAngle ( int angle)
protected

Definition at line 398 of file inventory.c.

Referenced by Controller().

◆ GetStringVariant()

string GetStringVariant ( string pInputAction,
notnull array< string > variants )
protected

Picks from the strings by active input limiter variant in order: {click,hold,doubleclick}. Intended for inputs that check 'LocalPress' exclusively!!

Definition at line 1536 of file inventory.c.

References ErrorEx, UAInputAPI::GetInputByName(), GetUApi(), UAInput::IsClickLimit(), UAInput::IsDoubleClickLimit(), UAInput::IsHoldBeginLimit(), UAInput::IsHoldLimit(), and UAInput::IsLimited().

◆ Init()

void Init ( )
protected

Definition at line 1207 of file inventory.c.

◆ InitDragAndDropEvents()

void InitDragAndDropEvents ( )
protected

◆ InitInputWrapperData()

void InitInputWrapperData ( )
protected

Definition at line 239 of file inventory.c.

References GetUApi(), m_InvInputNames, m_InvInputTimes, m_InvInputWrappers, and m_InvInputWrappersCount.

Referenced by Inventory().

◆ Inventory()

◆ InventoryMovementButtonTickHandler()

void InventoryMovementButtonTickHandler ( float timeslice)
protected

◆ LoadPlayerAttachmentIndexes()

void LoadPlayerAttachmentIndexes ( )
protected

◆ MoveAttachmentDown()

void MoveAttachmentDown ( int slot_id)
staticprotected

◆ MoveAttachmentUp()

void MoveAttachmentUp ( int slot_id)
staticprotected

◆ MoveFocusByArea()

void MoveFocusByArea ( int direction)
protected

Shifts between vicinity-hands-player.

Definition at line 1603 of file inventory.c.

References g_Game, ItemManager::GetInstance(), ItemManager::IsMicromanagmentMode(), m_HandsArea, m_LeftArea, m_RightArea, and UpdateConsoleToolbar().

Referenced by UpdateInterval().

◆ MoveFocusByContainer()

void MoveFocusByContainer ( int direction)
protected

Shifts between containers vertically.

Definition at line 1562 of file inventory.c.

References m_HandsArea, m_LeftArea, m_RightArea, and UpdateConsoleToolbar().

Referenced by UpdateInterval().

◆ OnCenterPanelDropReceived()

◆ OnHandsPanelDropReceived()

void OnHandsPanelDropReceived ( Widget w,
int x,
int y,
Widget receiver )
protected

Definition at line 467 of file inventory.c.

References m_HandsArea, x, and y.

◆ OnHide()

override void OnHide ( )
protected

◆ OnInputDeviceChanged()

◆ OnInputPresetChanged()

void OnInputPresetChanged ( )
protected

Definition at line 254 of file inventory.c.

References UpdateConsoleToolbar().

Referenced by Inventory().

◆ OnLeftPanelDropReceived()

void OnLeftPanelDropReceived ( Widget w,
int x,
int y,
Widget receiver )
protected

Definition at line 472 of file inventory.c.

References m_LeftArea, x, and y.

◆ OnRightPanelDropReceived()

void OnRightPanelDropReceived ( Widget w,
int x,
int y,
Widget receiver )
protected

◆ OnShow()

◆ Refresh()

override void Refresh ( )
protected

◆ RefreshQuickbar()

void RefreshQuickbar ( )
protected

Definition at line 1294 of file inventory.c.

References g_Game, m_Quickbar, and m_QuickbarWidget.

◆ Reset()

void Reset ( )
protected

Definition at line 1209 of file inventory.c.

References m_HandsArea, m_LeftArea, and m_RightArea.

Referenced by Update().

◆ ResetFocusedContainers()

void ResetFocusedContainers ( )
protected

Definition at line 1216 of file inventory.c.

References m_HandsArea, m_LeftArea, and m_RightArea.

Referenced by Inventory(), and OnHide().

◆ Serialize()

void Serialize ( )
protected

◆ SetLayoutName()

override void SetLayoutName ( )
protected

◆ TimerEnd()

void TimerEnd ( )
protected

Definition at line 425 of file inventory.c.

References m_ControllerRightStickTimer, and m_ControllerRightStickTimerEnd.

◆ Update()

◆ UpdateConsoleToolbar()

◆ UpdateInterval()

◆ UpdateSpecialtyMeter()

void UpdateSpecialtyMeter ( )
protected

Variable Documentation

◆ BT_REPEAT_DELAY

const float BT_REPEAT_DELAY = 0.35
protected

Definition at line 59 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler().

◆ BT_REPEAT_TIME

const float BT_REPEAT_TIME = 0.09
protected

Definition at line 60 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler().

◆ BT_THRESHOLD_VALUE

const float BT_THRESHOLD_VALUE = 0.8
protected

Definition at line 61 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler().

◆ INV_MOV_DOWN

const int INV_MOV_DOWN = 3
protected

Definition at line 65 of file inventory.c.

Referenced by Update().

◆ INV_MOV_LEFT

const int INV_MOV_LEFT = 0
protected

Definition at line 62 of file inventory.c.

Referenced by Update().

◆ INV_MOV_RIGHT

const int INV_MOV_RIGHT = 1
protected

Definition at line 63 of file inventory.c.

Referenced by Update().

◆ INV_MOV_UP

const int INV_MOV_UP = 2
protected

Definition at line 64 of file inventory.c.

Referenced by Update().

◆ m_BottomConsoleToolbar

Widget m_BottomConsoleToolbar
protected

Definition at line 38 of file inventory.c.

Referenced by Inventory(), and OnInputDeviceChanged().

◆ m_BottomConsoleToolbarRichText

RichTextWidget m_BottomConsoleToolbarRichText
protected

Definition at line 39 of file inventory.c.

Referenced by Inventory(), and UpdateConsoleToolbar().

◆ m_ContextMenu

ref ContextMenu m_ContextMenu
protected

Definition at line 41 of file inventory.c.

◆ m_ControllerAngle

int m_ControllerAngle
protected

Definition at line 50 of file inventory.c.

◆ m_ControllerRightStickTimer

ref Timer m_ControllerRightStickTimer
protected

Definition at line 53 of file inventory.c.

Referenced by Controller(), Inventory(), and TimerEnd().

◆ m_ControllerRightStickTimerEnd

bool m_ControllerRightStickTimerEnd = true
protected

Definition at line 52 of file inventory.c.

Referenced by Controller(), and TimerEnd().

◆ m_ControllerTilt

int m_ControllerTilt
protected

Definition at line 51 of file inventory.c.

◆ m_HadFastTransferred

bool m_HadFastTransferred
protected

Definition at line 44 of file inventory.c.

Referenced by OnShow(), and UpdateInterval().

◆ m_HadInspected

bool m_HadInspected
protected

Definition at line 45 of file inventory.c.

Referenced by OnShow(), and UpdateInterval().

◆ m_HandsArea

◆ m_HoldingQB

bool m_HoldingQB
protected

Definition at line 55 of file inventory.c.

Referenced by UpdateInterval().

◆ m_InpInp

UAInput m_InpInp = null
protected

Definition at line 766 of file inventory.c.

◆ m_Instance

Inventory m_Instance
staticprotected

Definition at line 48 of file inventory.c.

◆ m_InvInputActive

int m_InvInputActive = 0
protected

Definition at line 72 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler(), and Update().

◆ m_InvInputNames

ref array<string> m_InvInputNames = {"UAUILeftInventory","UAUIRightInventory","UAUIUpInventory","UAUIDownInventory"}
protected

Definition at line 66 of file inventory.c.

Referenced by InitInputWrapperData().

◆ m_InvInputTimes

ref array<float> m_InvInputTimes
protected

Definition at line 68 of file inventory.c.

Referenced by InitInputWrapperData(), and InventoryMovementButtonTickHandler().

◆ m_InvInputWrappers

ref array<UAIDWrapper> m_InvInputWrappers
protected

Definition at line 67 of file inventory.c.

Referenced by InitInputWrapperData(), and InventoryMovementButtonTickHandler().

◆ m_InvInputWrappersCount

int m_InvInputWrappersCount
protected

Definition at line 69 of file inventory.c.

Referenced by InitInputWrapperData(), and InventoryMovementButtonTickHandler().

◆ m_InvUAInput

UAInput m_InvUAInput
protected

Definition at line 71 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler().

◆ m_LeftArea

◆ m_NeedUpdateConsoleToolbar

bool m_NeedUpdateConsoleToolbar
protected

Definition at line 46 of file inventory.c.

Referenced by Inventory(), and UpdateConsoleToolbar().

◆ m_PlayerAttachmentsIndexes

ref map<string, int> m_PlayerAttachmentsIndexes
staticprotected

◆ m_PlayerPreview

ref PlayerPreview m_PlayerPreview
protected

Definition at line 31 of file inventory.c.

Referenced by Inventory(), OnShow(), and UpdateInterval().

◆ m_QBHoveredItems

InventoryItem m_QBHoveredItems
protected

Definition at line 56 of file inventory.c.

Referenced by UpdateInterval().

◆ m_Quickbar

ref InventoryQuickbar m_Quickbar
protected

Definition at line 32 of file inventory.c.

Referenced by Inventory(), and RefreshQuickbar().

◆ m_QuickbarWidget

Widget m_QuickbarWidget
protected

Definition at line 34 of file inventory.c.

Referenced by Inventory(), and RefreshQuickbar().

◆ m_RightArea

◆ m_SensitivityThreshold

float m_SensitivityThreshold = 0.0
protected

Definition at line 70 of file inventory.c.

Referenced by InventoryMovementButtonTickHandler().

◆ m_SpecializationIcon

Widget m_SpecializationIcon
protected

Definition at line 1737 of file inventory.c.

◆ m_SpecializationPanel

Widget m_SpecializationPanel
protected

Definition at line 1736 of file inventory.c.

◆ m_TopConsoleToolbarEquipment

Widget m_TopConsoleToolbarEquipment
protected

Definition at line 37 of file inventory.c.

Referenced by Inventory(), OnInputDeviceChanged(), and UpdateConsoleToolbar().

◆ m_TopConsoleToolbarHands

Widget m_TopConsoleToolbarHands
protected

Definition at line 36 of file inventory.c.

Referenced by Inventory(), OnInputDeviceChanged(), and UpdateConsoleToolbar().

◆ m_TopConsoleToolbarVicinity

Widget m_TopConsoleToolbarVicinity
protected

Definition at line 35 of file inventory.c.

Referenced by Inventory(), OnInputDeviceChanged(), and UpdateConsoleToolbar().