DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
Inventory.c File Reference

Enumerations

enum  Direction { RIGHT , LEFT , UP , DOWN }
 

Functions

void Inventory (LayoutHolder parent)
 
void InitInputWrapperData ()
 
protected void OnInputPresetChanged ()
 
protected void OnInputDeviceChanged (EInputDeviceType pInputDeviceType)
 
static Inventory GetInstance ()
 
void Serialize ()
 
void Deserialize ()
 
static int GetPlayerAttachmentIndex (string slot_name)
 
static int GetPlayerAttachmentIndex (int slot_id)
 
protected void LoadPlayerAttachmentIndexes ()
 
static void MoveAttachmentUp (int slot_id)
 
static void MoveAttachmentDown (int slot_id)
 
protected int GetProperControllerStickAngle (int angle)
 
protected int AngleToDirection (int angle)
 
void TimerEnd ()
 
bool Controller (Widget w, int control, int value)
 
void DraggingOverHandsPanel (Widget w, int x, int y, Widget receiver)
 
void OnHandsPanelDropReceived (Widget w, int x, int y, Widget receiver)
 
void OnLeftPanelDropReceived (Widget w, int x, int y, Widget receiver)
 
void OnRightPanelDropReceived (Widget w, int x, int y, Widget receiver)
 
void OnCenterPanelDropReceived (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 DraggingOverCenterPanel (Widget w, int x, int y, Widget receiver)
 
void Update (float timeslice)
 
override void UpdateInterval ()
 
void AddQuickbarItem (InventoryItem item, int index)
 
void EnableMicromanagement ()
 
void DisableMicromanagement ()
 
override void SetLayoutName ()
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
void Reset ()
 
void ResetFocusedContainers ()
 
override void OnShow ()
 
override void OnHide ()
 
override void Refresh ()
 
void RefreshQuickbar ()
 
Container GetFocusedArea ()
 
void UpdateConsoleToolbar ()
 
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 MoveFocusByContainer (int direction)
 Shifts between containers vertically.
 
void MoveFocusByArea (int direction)
 Shifts between vicinity-hands-player.
 
void InventoryMovementButtonTickHandler (float timeslice)
 
void UpdateSpecialtyMeter ()
 

Variables

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

Enumeration Type Documentation

◆ Direction

enum Direction
Enumerator
RIGHT 
LEFT 
UP 
DOWN 

Function Documentation

◆ AddQuickbarItem()

void AddQuickbarItem ( InventoryItem  item,
int  index 
)

◆ AngleToDirection()

protected int AngleToDirection ( int  angle)

Referenced by Controller().

◆ Controller()

◆ Deserialize()

◆ DisableMicromanagement()

◆ DraggingOverCenterPanel()

◆ DraggingOverHandsPanel()

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

◆ DraggingOverLeftPanel()

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

References m_LeftArea, x, and y.

◆ DraggingOverRightPanel()

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

◆ EnableMicromanagement()

◆ GetFocusedArea()

Container GetFocusedArea ( )

References m_HandsArea, m_LeftArea, and m_RightArea.

Referenced by UpdateConsoleToolbar().

◆ GetInstance()

static Inventory GetInstance ( )
static

References m_Instance.

◆ GetPlayerAttachmentIndex() [1/2]

static int GetPlayerAttachmentIndex ( int  slot_id)
static

◆ GetPlayerAttachmentIndex() [2/2]

static int GetPlayerAttachmentIndex ( string  slot_name)
static

◆ GetProperControllerStickAngle()

protected int GetProperControllerStickAngle ( int  angle)

Referenced by Controller().

◆ GetStringVariant()

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!!

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

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

whole body slots

upper body part slots

bottom body part slots

lower body part slots


heat comfort related slots

pre-init arrays

◆ InitInputWrapperData()

void InitInputWrapperData ( )

◆ Inventory()

void Inventory ( LayoutHolder  parent)

◆ InventoryMovementButtonTickHandler()

◆ LoadPlayerAttachmentIndexes()

◆ MoveAttachmentDown()

◆ MoveAttachmentUp()

◆ MoveFocusByArea()

◆ MoveFocusByContainer()

◆ OnCenterPanelDropReceived()

◆ OnHandsPanelDropReceived()

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

◆ OnHide()

◆ OnInputDeviceChanged()

◆ OnInputPresetChanged()

◆ OnLeftPanelDropReceived()

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

References m_LeftArea, x, and y.

◆ OnRightPanelDropReceived()

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

◆ OnShow()

◆ Refresh()

◆ RefreshQuickbar()

void RefreshQuickbar ( )

◆ Reset()

void Reset ( )

◆ ResetFocusedContainers()

void ResetFocusedContainers ( )

◆ Serialize()

◆ SetLayoutName()

◆ TimerEnd()

◆ Update()

◆ UpdateConsoleToolbar()

◆ UpdateInterval()

◆ UpdateSpecialtyMeter()

void UpdateSpecialtyMeter ( )

Variable Documentation

◆ BT_REPEAT_DELAY

const float BT_REPEAT_DELAY = 0.35

◆ BT_REPEAT_TIME

const float BT_REPEAT_TIME = 0.09

◆ BT_THRESHOLD_VALUE

const float BT_THRESHOLD_VALUE = 0.8

◆ INV_MOV_DOWN

const int INV_MOV_DOWN = 3

Referenced by Update().

◆ INV_MOV_LEFT

const int INV_MOV_LEFT = 0

Referenced by Update().

◆ INV_MOV_RIGHT

const int INV_MOV_RIGHT = 1

Referenced by Update().

◆ INV_MOV_UP

const int INV_MOV_UP = 2

Referenced by Update().

◆ m_BottomConsoleToolbar

protected Widget m_BottomConsoleToolbar

Referenced by Inventory(), and OnInputDeviceChanged().

◆ m_BottomConsoleToolbarRichText

protected RichTextWidget m_BottomConsoleToolbarRichText

Referenced by Inventory(), and UpdateConsoleToolbar().

◆ m_ContextMenu

protected ref ContextMenu m_ContextMenu

◆ m_ControllerAngle

protected int m_ControllerAngle

◆ m_ControllerRightStickTimer

protected ref Timer m_ControllerRightStickTimer

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

◆ m_ControllerRightStickTimerEnd

protected bool m_ControllerRightStickTimerEnd = true

Referenced by Controller(), and TimerEnd().

◆ m_ControllerTilt

protected int m_ControllerTilt

◆ m_HadFastTransferred

protected bool m_HadFastTransferred

Referenced by OnShow(), and UpdateInterval().

◆ m_HadInspected

protected bool m_HadInspected

Referenced by OnShow(), and UpdateInterval().

◆ m_HandsArea

◆ m_HoldingQB

protected bool m_HoldingQB

Referenced by UpdateInterval().

◆ m_InpInp

UAInput m_InpInp = null

◆ m_Instance

protected Inventory m_Instance
static

◆ m_InvInputActive

int m_InvInputActive = 0

◆ m_InvInputNames

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

Referenced by InitInputWrapperData().

◆ m_InvInputTimes

protected ref array<float> m_InvInputTimes

◆ m_InvInputWrappers

protected ref array<UAIDWrapper> m_InvInputWrappers

◆ m_InvInputWrappersCount

protected int m_InvInputWrappersCount

◆ m_InvUAInput

UAInput m_InvUAInput

◆ m_LeftArea

◆ m_NeedUpdateConsoleToolbar

protected bool m_NeedUpdateConsoleToolbar

Referenced by Inventory(), and UpdateConsoleToolbar().

◆ m_PlayerAttachmentsIndexes

protected ref map<string, int> m_PlayerAttachmentsIndexes
static

◆ m_PlayerPreview

protected ref PlayerPreview m_PlayerPreview

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

◆ m_QBHoveredItems

protected InventoryItem m_QBHoveredItems

Referenced by UpdateInterval().

◆ m_Quickbar

protected ref InventoryQuickbar m_Quickbar

◆ m_QuickbarWidget

◆ m_RightArea

◆ m_SensitivityThreshold

protected float m_SensitivityThreshold = 0.0

◆ m_SpecializationIcon

protected Widget m_SpecializationIcon

◆ m_SpecializationPanel

protected Widget m_SpecializationPanel

◆ m_TopConsoleToolbarEquipment

protected Widget m_TopConsoleToolbarEquipment

◆ m_TopConsoleToolbarHands

protected Widget m_TopConsoleToolbarHands

◆ m_TopConsoleToolbarVicinity

protected Widget m_TopConsoleToolbarVicinity