PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
ActionTargetsCursor Class Reference

Private Member Functions

void ActionTargetsCursor ()
 
void ~ActionTargetsCursor ()
 
void SetHealthVisibility (bool state)
 
void SetQuantityVisibility (bool state)
 
void SetInteractXboxIcon (string imageset_name, string image_name)
 DEPRECATED.
 
void SetContinuousInteractXboxIcon (string imageset_name, string image_name)
 
void SetSingleXboxIcon (string imageset_name, string image_name)
 
void SetContinuousXboxIcon (string imageset_name, string image_name)
 
protected void SetXboxIcon (string name, string imageset_name, string image_name)
 
protected void SetControllerIcon (string pWidgetName, string pInputName)
 
protected void OnWidgetScriptInit (Widget w)
 
protected void OnInputPresetChanged ()
 
protected void OnInputDeviceChanged (EInputDeviceType pInputDeviceType)
 
private void UpdateControllerInputIcons ()
 Loads icons from the latest keybinds.
 
private void UpdatePCIconsVisibility ()
 Contains logic for icon set switching (Gamepad/M&K)
 
protected void PrepareCursorContent ()
 
protected void BuildFixedCursor ()
 
protected void BuildFloatingCursor (bool forceRebuild)
 
override bool OnUpdate (Widget w)
 
protected void HideWidget ()
 
void Update ()
 
protected void ShowXboxHidePCIcons (string widget, bool show_xbox_icon)
 
protected vector TransformToScreenPos (vector pWorldPos)
 transform world pos to screen pos (related to parent widget size)
 
protected void GetOnScreenPosition (out float x, out float y)
 
protected bool IsComponentInSelection (array< Selection > selection, string compName)
 
protected void GetPlayer ()
 
protected void GetActionManager ()
 
protected void GetActions ()
 get actions from Action Manager
 
protected void GetTarget ()
 
protected string GetActionDesc (ActionBase action)
 
protected string GetItemDesc (ActionBase action)
 
protected int GetItemHealth ()
 
protected bool GetItemFrozen ()
 
protected void GetItemQuantity (out int q_type, out float q_cur, out int q_min, out int q_max)
 
protected void GetItemCargoCount (out int cargoCount)
 returns number of items in cargo for targeted entity
 
protected void SetItemDesc (string descText, int cargoCount, string itemWidget, string descWidget)
 
protected void SetItemHealth (int health, string itemWidget, string healthWidget, bool enabled)
 
protected void SetItemQuantity (int type, float current, int min, int max, string itemWidget, string quantityPBWidget, string quantityTextWidget, bool enabled)
 
protected void SetActionWidget (ActionBase action, string descText, string actionWidget, string descWidget)
 
protected void SetMultipleInteractAction (string multiActionsWidget, string multiActionsWidget_NotSelect)
 shows arrows near the interact action if there are more than one available
 
protected void SetMultipleContinuousInteractAction (string multiActionsWidget, string multiActionsWidget_NotSelect)
 
protected void SetMultipleItemAction (string multiActionsWidget, string multiActionsWidget_NotSelect)
 
protected void SetMultipleContinuousItemAction (string multiActionsWidget, string multiActionsWidget_NotSelect)
 
protected void SetInteractActionIcon (string actionWidget, string actionIconFrameWidget, string actionIconWidget, string actionIconTextWidget)
 
protected void CheckRefresherFlagVisibilityEx (ActionTarget target)
 
protected int AttachmentsWithInventoryOrCargoCount (notnull GameInventory inventory)
 
protected IngameHud GetHud ()
 
protected void CheckRefresherFlagVisibility (Object object)
 

Private Attributes

private const ref array< typenameVISION_OBSTRUCTION_PPEFFECTS_TYPES
 
protected PlayerBase m_Player
 
protected ActionTarget m_Target
 
protected ref ATCCachedObject m_CachedObject
 
protected Object m_DisplayInteractTarget
 
protected ActionBase m_Interact
 
protected ActionBase m_ContinuousInteract
 
protected ActionBase m_Single
 
protected ActionBase m_Continuous
 
protected ActionManagerClient m_AM
 
protected IngameHud m_Hud
 
protected UAIDWrapper m_UseActionWrapper
 
protected int m_InteractActionsNum
 
protected int m_ContinuousInteractActionsNum
 
protected int m_ItemActionsNum
 
protected int m_ContinuousItemActionsNum
 
protected m_SelectedActionCategory
 
protected bool m_HealthEnabled
 
protected bool m_QuantityEnabled
 
protected bool m_FixedOnPosition
 
protected bool m_Hidden
 
protected bool m_TargetItemFrozen
 
protected Widget m_Root
 
protected Widget m_Container
 
protected Widget m_ItemLeft
 
protected float m_MaxWidthChild
 widget width
 
protected float m_RootWidth
 
protected float m_RootHeight
 

Constructor & Destructor Documentation

◆ ActionTargetsCursor()

◆ ~ActionTargetsCursor()

void ~ActionTargetsCursor ( )
inlineprivate

Member Function Documentation

◆ AttachmentsWithInventoryOrCargoCount()

protected int AttachmentsWithInventoryOrCargoCount ( notnull GameInventory  inventory)
inlineprivate

◆ BuildFixedCursor()

protected void BuildFixedCursor ( )
inlineprivate

References GetScreenSize(), m_Root, PrepareCursorContent(), x, and y.

Referenced by Update().

◆ BuildFloatingCursor()

protected void BuildFloatingCursor ( bool  forceRebuild)
inlineprivate

Get OnScreenPos when forced or targeted component differs

in case of cached item, all above is reused except the position

References Math::Ceil(), ATCCachedObject::GetCursorCompIdx(), ATCCachedObject::GetCursorWorldPos(), GetOnScreenPosition(), m_CachedObject, m_Root, m_Target, PrepareCursorContent(), and TransformToScreenPos().

Referenced by Update().

◆ CheckRefresherFlagVisibility()

protected void CheckRefresherFlagVisibility ( Object  object)
private

◆ CheckRefresherFlagVisibilityEx()

protected void CheckRefresherFlagVisibilityEx ( ActionTarget  target)
inlineprivate

References m_Player, and m_Root.

Referenced by Update().

◆ GetActionDesc()

◆ GetActionManager()

protected void GetActionManager ( )
inlineprivate

References Class::CastTo(), m_AM, and m_Player.

Referenced by Update().

◆ GetActions()

protected void GetActions ( )
inlineprivate

get actions from Action Manager

Referenced by Update().

◆ GetHud()

protected IngameHud GetHud ( )
inlineprivate

◆ GetItemCargoCount()

protected void GetItemCargoCount ( out int  cargoCount)
inlineprivate

returns number of items in cargo for targeted entity

default cargo count

Referenced by PrepareCursorContent().

◆ GetItemDesc()

protected string GetItemDesc ( ActionBase  action)
inlineprivate

◆ GetItemFrozen()

protected bool GetItemFrozen ( )
inlineprivate

References m_DisplayInteractTarget, and m_Target.

Referenced by PrepareCursorContent().

◆ GetItemHealth()

◆ GetItemQuantity()

protected void GetItemQuantity ( out int  q_type,
out float  q_cur,
out int  q_min,
out int  q_max 
)
inlineprivate

◆ GetOnScreenPosition()

protected void GetOnScreenPosition ( out float  x,
out float  y 
)
inlineprivate

kept for backward compatibility

Get memory LOD from p3d

save selection from memory lod

cache current object and the widget world pos

doors/handles

single vertex in selection

multiple vertices in selection

cache current object and the widget world pos

do not store component index for doors/handles

ladders handling

cache current object and the widget world pos

do not store component index for ladders

References Math::AbsFloat(), string::Contains(), vector::DistanceSq(), GetName(), LOD::GetSelections(), GetType(), HasFixedActionTargetCursorPosition(), IsComponentInSelection(), m_CachedObject, m_FixedOnPosition, m_Player, m_Target, LOD::NAME_MEMORY, ATCCachedObject::Store(), TransformToScreenPos(), x, y, and vector::Zero.

Referenced by BuildFloatingCursor().

◆ GetPlayer()

protected void GetPlayer ( )
inlineprivate

References Class::CastTo(), GetGame(), GetPlayer(), and m_Player.

Referenced by GetPlayer(), and Update().

◆ GetTarget()

protected void GetTarget ( )
inlineprivate

◆ HideWidget()

protected void HideWidget ( )
inlineprivate

References ATCCachedObject::Invalidate(), m_CachedObject, and m_Root.

Referenced by Update().

◆ IsComponentInSelection()

protected bool IsComponentInSelection ( array< Selection selection,
string  compName 
)
inlineprivate

Referenced by GetOnScreenPosition().

◆ OnInputDeviceChanged()

protected void OnInputDeviceChanged ( EInputDeviceType  pInputDeviceType)
inlineprivate

◆ OnInputPresetChanged()

protected void OnInputPresetChanged ( )
inlineprivate

◆ OnUpdate()

override bool OnUpdate ( Widget  w)
inlineprivate

References m_Root, and Update().

◆ OnWidgetScriptInit()

protected void OnWidgetScriptInit ( Widget  w)
inlineprivate

◆ PrepareCursorContent()

◆ SetActionWidget()

protected void SetActionWidget ( ActionBase  action,
string  descText,
string  actionWidget,
string  descWidget 
)
inlineprivate

◆ SetContinuousInteractXboxIcon()

void SetContinuousInteractXboxIcon ( string  imageset_name,
string  image_name 
)
private

◆ SetContinuousXboxIcon()

void SetContinuousXboxIcon ( string  imageset_name,
string  image_name 
)
private

◆ SetControllerIcon()

protected void SetControllerIcon ( string  pWidgetName,
string  pInputName 
)
inlineprivate

◆ SetHealthVisibility()

void SetHealthVisibility ( bool  state)
inlineprivate

References m_HealthEnabled.

◆ SetInteractActionIcon()

protected void SetInteractActionIcon ( string  actionWidget,
string  actionIconFrameWidget,
string  actionIconWidget,
string  actionIconTextWidget 
)
inlineprivate

◆ SetInteractXboxIcon()

void SetInteractXboxIcon ( string  imageset_name,
string  image_name 
)
private

DEPRECATED.

◆ SetItemDesc()

protected void SetItemDesc ( string  descText,
int  cargoCount,
string  itemWidget,
string  descWidget 
)
inlineprivate

Last message from finished User Action on target (Thermometer, Blood Test Kit, etc.)

when cargo in container

References Class::CastTo(), string::Format(), string::Length(), m_Root, m_Target, and string::ToUpper().

Referenced by PrepareCursorContent().

◆ SetItemHealth()

protected void SetItemHealth ( int  health,
string  itemWidget,
string  healthWidget,
bool  enabled 
)
inlineprivate

◆ SetItemQuantity()

protected void SetItemQuantity ( int  type,
float  current,
int  min,
int  max,
string  itemWidget,
string  quantityPBWidget,
string  quantityTextWidget,
bool  enabled 
)
inlineprivate

◆ SetMultipleContinuousInteractAction()

protected void SetMultipleContinuousInteractAction ( string  multiActionsWidget,
string  multiActionsWidget_NotSelect 
)
inlineprivate

◆ SetMultipleContinuousItemAction()

protected void SetMultipleContinuousItemAction ( string  multiActionsWidget,
string  multiActionsWidget_NotSelect 
)
inlineprivate

◆ SetMultipleInteractAction()

protected void SetMultipleInteractAction ( string  multiActionsWidget,
string  multiActionsWidget_NotSelect 
)
inlineprivate

shows arrows near the interact action if there are more than one available

Referenced by PrepareCursorContent().

◆ SetMultipleItemAction()

protected void SetMultipleItemAction ( string  multiActionsWidget,
string  multiActionsWidget_NotSelect 
)
inlineprivate

◆ SetQuantityVisibility()

void SetQuantityVisibility ( bool  state)
inlineprivate

References m_QuantityEnabled.

◆ SetSingleXboxIcon()

void SetSingleXboxIcon ( string  imageset_name,
string  image_name 
)
private

◆ SetXboxIcon()

protected void SetXboxIcon ( string  name,
string  imageset_name,
string  image_name 
)
private

◆ ShowXboxHidePCIcons()

protected void ShowXboxHidePCIcons ( string  widget,
bool  show_xbox_icon 
)
inlineprivate

References m_Root.

Referenced by UpdatePCIconsVisibility().

◆ TransformToScreenPos()

protected vector TransformToScreenPos ( vector  pWorldPos)
inlineprivate

transform world pos to screen pos (related to parent widget size)

get relative pos for screen from world pos vector

get size of parent widget

calculate corrent position from relative pos and parent widget size

Referenced by BuildFloatingCursor(), and GetOnScreenPosition().

◆ Update()

void Update ( )
inlineprivate

don't show floating widget if it's disabled in profile or the player is unconscious

check if action has target, otherwise don't show the widget

cursor with fixed position (environment interaction mainly)

build cursor for new target

use cached version for known target - recalculate onscreen pos only

References BuildFixedCursor(), BuildFloatingCursor(), CheckRefresherFlagVisibilityEx(), ATCCachedObject::Get(), GetActionManager(), GetActions(), GetDayZGame(), GetPlayer(), PPEManagerStatic::GetPPEManager(), GetTarget(), ActionBase::HasTarget(), HideWidget(), ATCCachedObject::Invalidate(), m_AM, m_CachedObject, m_Continuous, m_ContinuousInteract, m_FixedOnPosition, m_Hidden, m_Hud, m_Interact, m_MaxWidthChild, m_Player, m_Root, m_Single, m_Target, and VISION_OBSTRUCTION_PPEFFECTS_TYPES.

Referenced by OnUpdate(), and Hud::Update().

◆ UpdateControllerInputIcons()

private void UpdateControllerInputIcons ( )
inlineprivate

Loads icons from the latest keybinds.

References SetControllerIcon().

Referenced by OnInputPresetChanged(), and OnWidgetScriptInit().

◆ UpdatePCIconsVisibility()

private void UpdatePCIconsVisibility ( )
inlineprivate

Field Documentation

◆ m_AM

◆ m_CachedObject

protected ref ATCCachedObject m_CachedObject
private

◆ m_Container

protected Widget m_Container
private

Referenced by OnWidgetScriptInit().

◆ m_Continuous

protected ActionBase m_Continuous
private

◆ m_ContinuousInteract

protected ActionBase m_ContinuousInteract
private

◆ m_ContinuousInteractActionsNum

protected int m_ContinuousInteractActionsNum
private

◆ m_ContinuousItemActionsNum

protected int m_ContinuousItemActionsNum
private

◆ m_DisplayInteractTarget

protected Object m_DisplayInteractTarget
private

◆ m_FixedOnPosition

protected bool m_FixedOnPosition
private

Referenced by GetOnScreenPosition(), and Update().

◆ m_HealthEnabled

protected bool m_HealthEnabled
private

◆ m_Hidden

protected bool m_Hidden
private

◆ m_Hud

protected IngameHud m_Hud
private

Referenced by ActionTargetsCursor(), and Update().

◆ m_Interact

◆ m_InteractActionsNum

protected int m_InteractActionsNum
private

◆ m_ItemActionsNum

protected int m_ItemActionsNum
private

Referenced by SetMultipleItemAction().

◆ m_ItemLeft

protected Widget m_ItemLeft
private

Referenced by OnWidgetScriptInit().

◆ m_MaxWidthChild

protected float m_MaxWidthChild
private

widget width

Referenced by SetActionWidget(), and Update().

◆ m_Player

◆ m_QuantityEnabled

protected bool m_QuantityEnabled
private

◆ m_Root

◆ m_RootHeight

protected float m_RootHeight
private

◆ m_RootWidth

protected float m_RootWidth
private

◆ m_SelectedActionCategory

protected m_SelectedActionCategory
private

◆ m_Single

protected ActionBase m_Single
private

◆ m_Target

◆ m_TargetItemFrozen

protected bool m_TargetItemFrozen
private

◆ m_UseActionWrapper

protected UAIDWrapper m_UseActionWrapper
private

◆ VISION_OBSTRUCTION_PPEFFECTS_TYPES

private const ref array<typename> VISION_OBSTRUCTION_PPEFFECTS_TYPES
private
Initial value:
= {
PPERequester_BurlapSackEffects,
PPERequester_FlashbangEffects
}

Referenced by Update().


The documentation for this class was generated from the following file: