Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
ItemManager Class Reference

Protected Member Functions

void ItemManager (Widget root)
void CalculateTooltipSlotPosition (int x=0, int y=0)
void ClearDefaultHeaderOpenStates ()
void ClearDefaultOpenStates ()
void DeserializeDefaultHeaderOpenStates ()
void DeserializeDefaultOpenStates ()
bool EvaluateContainerDragabilityDefault (EntityAI entity)
Widget GetCenterDropzone ()
bool GetDefaultHeaderOpenState (string type)
bool GetDefaultOpenState (string type)
bool GetDefaultOpenStateHands ()
Icon GetDraggedIcon ()
EntityAI GetDraggedItem ()
HandsPreview GetHandsPreview ()
EntityAI GetHoveredItem ()
Widget GetLeftDropzone ()
ScrollWidget GetLeftSlotsScroller ()
Widget GetRightDropzone ()
Container GetSelectedContainer ()
SlotsIcon GetSelectedIcon ()
EntityAI GetSelectedItem ()
Widget GetSelectedWidget ()
void HideDropzones ()
void HideTooltip ()
void HideTooltipSlot ()
bool IsDragging ()
bool IsMicromanagmentMode ()
void PrepareSlotsTooltip (string name, string desc, int x=0, int y=0)
 position is currentlycalculated from the owning 'm_TooltipSourceWidget' directly
void PrepareTooltip (EntityAI item, int x=0, int y=0)
void SerializeDefaultHeaderOpenStates ()
void SerializeDefaultOpenStates ()
void SetDefaultHeaderOpenState (string type, bool is_opened)
void SetDefaultOpenState (string type, bool is_opened)
void SetDefaultOpenStateHands (bool is_opened)
void SetDraggedIcon (Icon dragged_icon)
void SetDraggedItem (EntityAI dragged_item)
void SetHandsPreview (HandsPreview hansd_preview)
void SetIconTemperature (EntityAI item, Widget item_w)
void SetIsDragging (bool is_dragging)
void SetItemMicromanagmentMode (bool item_micromanagment_mode)
void SetSelectedItem (EntityAI selected_item, Container selected_container, Widget selected_widget, SlotsIcon selected_icon)
void SetSelectedItemEx (EntityAI selected_item, Container selected_container, LayoutHolder selected_icon)
void SetTemperature (EntityAI item, Widget item_w)
void SetTooltipWidget (Widget w)
void SetWidgetDraggable (Widget w, bool draggable)
void ShowSourceDropzone (EntityAI item)
void ShowTooltip ()
void ShowTooltipSlot ()
void UpdateTooltipSlotPosition ()

Static Protected Member Functions

static int ColorFromFloat (float fraction)
static int GetChosenCombinationFlag (EntityAI selectedEntity, EntityAI targetEntity, int relevantFlags, out InventoryLocation dst=null)
static int GetCombinationFlags (EntityAI entity1, EntityAI entity2)
static ItemManager GetInstance ()
static int GetItemHealthColor (EntityAI item, string zone="")
static int GetItemHealthColor (int pHealthLevel)
static int GetRecipeCount (bool recipe_anywhere, EntityAI entity1, EntityAI entity2)

Protected Attributes

Widget m_CenterDropzone
ref map< string, boolm_DefautHeaderOpenStates
ref map< string, boolm_DefautOpenStates
Icon m_DraggedIcon
EntityAI m_DraggedItem
int m_HandsDefaultOpenState
HandsPreview m_HandsPreview
EntityAI m_HoveredItem
bool m_IsDragging
bool m_ItemMicromanagmentMode
ItemPreviewWidget m_ItemPreviewWidget
Widget m_LeftDropzone
ScrollWidget m_LeftSlotsScroller
Widget m_RightDropzone
Widget m_RootWidget
LayoutHolder m_SelectedBaseIcon
Container m_SelectedContainer
SlotsIcon m_SelectedIcon
EntityAI m_SelectedItem
Widget m_SelectedWidget
bool m_SlotInfoShown
ref Widget m_TooltipCategoryWidget
int m_TooltipPosX
int m_TooltipPosY
ref Timer m_TooltipSlotTimer
ref Widget m_TooltipSlotWidget
Widget m_TooltipSourceWidget
ref Timer m_ToolTipTimer
ref Widget m_TooltipWidget
const float TOOLTIP_DELAY = 0.25

Static Private Attributes

static ref ItemManager m_Instance

Detailed Description

Definition at line 1 of file itemmanager.c.

Constructor & Destructor Documentation

◆ ItemManager()

Member Function Documentation

◆ CalculateTooltipSlotPosition()

void CalculateTooltipSlotPosition ( int x = 0,
int y = 0 )
inlineprotected

◆ ClearDefaultHeaderOpenStates()

void ClearDefaultHeaderOpenStates ( )
inlineprotected

Definition at line 163 of file itemmanager.c.

References m_DefautHeaderOpenStates.

Referenced by DeserializeDefaultHeaderOpenStates().

◆ ClearDefaultOpenStates()

void ClearDefaultOpenStates ( )
inlineprotected

Definition at line 158 of file itemmanager.c.

References m_DefautOpenStates.

Referenced by DeserializeDefaultOpenStates().

◆ ColorFromFloat()

int ColorFromFloat ( float fraction)
inlinestaticprotected

◆ DeserializeDefaultHeaderOpenStates()

void DeserializeDefaultHeaderOpenStates ( )
inlineprotected

Definition at line 210 of file itemmanager.c.

References ClearDefaultHeaderOpenStates(), g_Game, and SetDefaultHeaderOpenState().

Referenced by Deserialize().

◆ DeserializeDefaultOpenStates()

void DeserializeDefaultOpenStates ( )
inlineprotected

Definition at line 242 of file itemmanager.c.

References ClearDefaultOpenStates(), g_Game, and SetDefaultOpenState().

Referenced by Deserialize().

◆ EvaluateContainerDragabilityDefault()

bool EvaluateContainerDragabilityDefault ( EntityAI entity)
inlineprotected

◆ GetCenterDropzone()

◆ GetChosenCombinationFlag()

◆ GetCombinationFlags()

◆ GetDefaultHeaderOpenState()

bool GetDefaultHeaderOpenState ( string type)
inlineprotected

Definition at line 270 of file itemmanager.c.

References m_DefautHeaderOpenStates.

Referenced by CollapsibleContainer::LoadDefaultState().

◆ GetDefaultOpenState()

bool GetDefaultOpenState ( string type)
inlineprotected

Definition at line 258 of file itemmanager.c.

References m_DefautOpenStates.

◆ GetDefaultOpenStateHands()

bool GetDefaultOpenStateHands ( )
inlineprotected

Definition at line 186 of file itemmanager.c.

References g_Game, m_HandsDefaultOpenState, and string::ToInt().

◆ GetDraggedIcon()

Icon GetDraggedIcon ( )
inlineprotected

Definition at line 378 of file itemmanager.c.

References m_DraggedIcon.

Referenced by Icon::Swap().

◆ GetDraggedItem()

◆ GetHandsPreview()

HandsPreview GetHandsPreview ( )
inlineprotected

◆ GetHoveredItem()

EntityAI GetHoveredItem ( )
inlineprotected

Definition at line 358 of file itemmanager.c.

References m_HoveredItem.

Referenced by UpdateInterval().

◆ GetInstance()

ItemManager GetInstance ( )
inlinestaticprotected

Definition at line 282 of file itemmanager.c.

References ItemManager(), and m_Instance.

Referenced by HandsContainer::HandsContainer(), Icon::Icon(), Icon::~Icon(), SlotsIcon::~SlotsIcon(), LayoutHolder::CanAddToQuickbarEx(), LayoutHolder::CanCombineEx(), LayoutHolder::CanDropEx(), LayoutHolder::CanEquipEx(), LayoutHolder::CanOpenCloseContainer(), LayoutHolder::CanSplitEx(), LayoutHolder::CanSwapOrTakeToHandsEx(), LayoutHolder::CanTakeToInventoryEx(), SlotsIcon::ClearRemainSelected(), ClosableContainer::Close(), Container::Close(), VicinityContainer::CollapseButtonOnMouseButtonDown(), Attachments::Combine(), Icon::Combine(), PlayerContainer::Combine(), VicinitySlotsContainer::Combine(), Icon::CreateWhiteBackground(), Deserialize(), Icon::DestroyWhiteBackground(), DisableMicromanagement(), ClosableContainer::DraggingOver(), Icon::DraggingOver(), PlayerContainer::DraggingOver(), DraggingOverCenterPanel(), ClosableContainer::DraggingOverGrid(), ClosableContainer::DraggingOverGrid(), HandsContainer::DraggingOverGrid(), DraggingOverHandsPanel(), HandsArea::DraggingOverHandsPanel(), AttachmentCategoriesContainer::DraggingOverHeader(), AttachmentCategoriesRow::DraggingOverHeader(), ClosableContainer::DraggingOverHeader(), HandsContainer::DraggingOverHeader(), PlayerContainer::DraggingOverHeader(), VicinityContainer::DraggingOverHeader(), VicinityContainer::DraggingOverIcon(), Icon::DraggingOverSwap(), ClosableContainer::DropReceived(), ClosableContainer::DropReceived(), HandsContainer::DropReceived(), Icon::DropReceivedFromMain(), EnableMicromanagement(), ColorManager::GetItemColor(), ScriptedWidgetEventHandler::HideOwnedSlotsTooltip(), ScriptedWidgetEventHandler::HideOwnedTooltip(), SlotsIcon::Init(), Icon::InitLock(), CollapsibleContainer::LoadDefaultState(), VicinitySlotsContainer::MouseButtonDown(), AttachmentCategoriesRow::MouseClick(), Icon::MouseClick(), PlayerContainer::MouseClick(), ZombieContainer::MouseClick(), ClosableContainer::MouseClick2(), HandsContainer::MouseClick2(), MoveFocusByArea(), Icon::OnDraggingOverBackground(), ClosableHeader::OnDragHeader(), ClosableHeader::OnDropHeader(), PlayerContainer::OnDropReceivedFromGhostArea(), AttachmentCategoriesRow::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromHeader(), VicinityContainer::OnDropReceivedFromIcon(), OnHide(), SlotsIcon::OnIconDrag(), SlotsIcon::OnIconDrop(), InventoryGridController::OnItemDrop(), InventoryGridController::OnItemDropReceived(), HandsContainer::OnSelectButton(), OnShow(), MissionBase::OnUpdate(), ClosableContainer::Open(), Container::Open(), ScriptedWidgetEventHandler::PrepareOwnedSlotsTooltip(), ScriptedWidgetEventHandler::PrepareOwnedTooltip(), AttachmentCategoriesRow::RefreshSlot(), AttachmentCategoriesRow::Select(), Attachments::Select(), Container::Select(), HandsPreview::Select(), PlayerContainer::Select(), VicinitySlotsContainer::Select(), ZombieContainer::Select(), Attachments::SelectItem(), Container::SelectItem(), HandsPreview::SelectItem(), SlotsContainer::SelectItem(), Serialize(), Container::SetOpenState(), Icon::SetTemperature(), SlotsIcon::SetTemperature(), Icon::ShowActionMenuCombine(), VicinitySlotsContainer::ShowItemsInContainers(), Icon::Swap(), ClosableContainer::TakeAsAttachment(), HandsContainer::TakeAsAttachment(), PlayerContainer::ToggleWidget(), UpdateConsoleToolbar(), Icon::UpdateFrameColor(), VicinityContainer::UpdateHeader(), Attachments::UpdateInterval(), ClosableContainer::UpdateInterval(), HandsPreview::UpdateInterval(), UpdateInterval(), VicinityContainer::UpdateInterval(), and IconsContainer::UpdateItemsTemperature().

◆ GetItemHealthColor() [1/2]

◆ GetItemHealthColor() [2/2]

◆ GetLeftDropzone()

◆ GetLeftSlotsScroller()

ScrollWidget GetLeftSlotsScroller ( )
inlineprotected

Definition at line 864 of file itemmanager.c.

References m_LeftSlotsScroller, and m_RootWidget.

Referenced by VicinityContainer::DraggingOverHeader(), and HideDropzones().

◆ GetRecipeCount()

int GetRecipeCount ( bool recipe_anywhere,
EntityAI entity1,
EntityAI entity2 )
inlinestaticprotected

Definition at line 858 of file itemmanager.c.

References g_Game, and GetPlugin().

◆ GetRightDropzone()

◆ GetSelectedContainer()

Container GetSelectedContainer ( )
inlineprotected

Definition at line 90 of file itemmanager.c.

References m_SelectedContainer.

Referenced by Container::Select().

◆ GetSelectedIcon()

SlotsIcon GetSelectedIcon ( )
inlineprotected

◆ GetSelectedItem()

◆ GetSelectedWidget()

Widget GetSelectedWidget ( )
inlineprotected

Definition at line 95 of file itemmanager.c.

References m_SelectedWidget.

◆ HideDropzones()

◆ HideTooltip()

void HideTooltip ( )
inlineprotected

◆ HideTooltipSlot()

void HideTooltipSlot ( )
inlineprotected

◆ IsDragging()

bool IsDragging ( )
inlineprotected

◆ IsMicromanagmentMode()

◆ PrepareSlotsTooltip()

void PrepareSlotsTooltip ( string name,
string desc,
int x = 0,
int y = 0 )
inlineprotected

position is currentlycalculated from the owning 'm_TooltipSourceWidget' directly

Definition at line 585 of file itemmanager.c.

References HideTooltip(), m_SlotInfoShown, m_TooltipSlotTimer, m_TooltipSlotWidget, name, TOOLTIP_DELAY, x, and y.

Referenced by ScriptedWidgetEventHandler::PrepareOwnedSlotsTooltip().

◆ PrepareTooltip()

void PrepareTooltip ( EntityAI item,
int x = 0,
int y = 0 )
inlineprotected

◆ SerializeDefaultHeaderOpenStates()

void SerializeDefaultHeaderOpenStates ( )
inlineprotected

Definition at line 194 of file itemmanager.c.

References g_Game, and m_DefautHeaderOpenStates.

Referenced by Serialize().

◆ SerializeDefaultOpenStates()

void SerializeDefaultOpenStates ( )
inlineprotected

Definition at line 226 of file itemmanager.c.

References g_Game, and m_DefautOpenStates.

Referenced by Serialize().

◆ SetDefaultHeaderOpenState()

void SetDefaultHeaderOpenState ( string type,
bool is_opened )
inlineprotected

◆ SetDefaultOpenState()

void SetDefaultOpenState ( string type,
bool is_opened )
inlineprotected

◆ SetDefaultOpenStateHands()

void SetDefaultOpenStateHands ( bool is_opened)
inlineprotected

Definition at line 178 of file itemmanager.c.

References g_Game, and m_HandsDefaultOpenState.

◆ SetDraggedIcon()

void SetDraggedIcon ( Icon dragged_icon)
inlineprotected

Definition at line 373 of file itemmanager.c.

References m_DraggedIcon.

Referenced by Icon::CreateWhiteBackground(), and SetIsDragging().

◆ SetDraggedItem()

void SetDraggedItem ( EntityAI dragged_item)
inlineprotected

Definition at line 363 of file itemmanager.c.

References m_DraggedItem.

Referenced by Icon::CreateWhiteBackground(), SlotsIcon::OnIconDrag(), and SetIsDragging().

◆ SetHandsPreview()

void SetHandsPreview ( HandsPreview hansd_preview)
inlineprotected

Definition at line 80 of file itemmanager.c.

References m_HandsPreview.

Referenced by HandsContainer::HandsContainer().

◆ SetIconTemperature()

void SetIconTemperature ( EntityAI item,
Widget item_w )
inlineprotected

Definition at line 501 of file itemmanager.c.

Referenced by Icon::SetTemperature().

◆ SetIsDragging()

◆ SetItemMicromanagmentMode()

void SetItemMicromanagmentMode ( bool item_micromanagment_mode)
inlineprotected

Definition at line 64 of file itemmanager.c.

References Inventory(), and m_ItemMicromanagmentMode.

Referenced by DisableMicromanagement(), EnableMicromanagement(), OnHide(), and OnShow().

◆ SetSelectedItem()

void SetSelectedItem ( EntityAI selected_item,
Container selected_container,
Widget selected_widget,
SlotsIcon selected_icon )
inlineprotected

Definition at line 105 of file itemmanager.c.

References m_SelectedContainer, m_SelectedIcon, m_SelectedItem, and m_SelectedWidget.

◆ SetSelectedItemEx()

◆ SetTemperature()

void SetTemperature ( EntityAI item,
Widget item_w )
inlineprotected

Definition at line 479 of file itemmanager.c.

References name.

Referenced by SlotsIcon::SetTemperature().

◆ SetTooltipWidget()

void SetTooltipWidget ( Widget w)
inlineprotected

◆ SetWidgetDraggable()

◆ ShowSourceDropzone()

◆ ShowTooltip()

void ShowTooltip ( )
inlineprotected

Definition at line 704 of file itemmanager.c.

References m_ItemPreviewWidget, and m_TooltipWidget.

◆ ShowTooltipSlot()

void ShowTooltipSlot ( )
inlineprotected

◆ UpdateTooltipSlotPosition()

void UpdateTooltipSlotPosition ( )
inlineprotected

Definition at line 667 of file itemmanager.c.

References CalculateTooltipSlotPosition(), m_TooltipSourceWidget, x, and y.

Referenced by ShowTooltipSlot().

Field Documentation

◆ m_CenterDropzone

Widget m_CenterDropzone
protected

Definition at line 31 of file itemmanager.c.

Referenced by GetCenterDropzone().

◆ m_DefautHeaderOpenStates

◆ m_DefautOpenStates

ref map<string, bool> m_DefautOpenStates
protected

◆ m_DraggedIcon

Icon m_DraggedIcon
protected

Definition at line 8 of file itemmanager.c.

Referenced by GetDraggedIcon(), and SetDraggedIcon().

◆ m_DraggedItem

EntityAI m_DraggedItem
protected

Definition at line 7 of file itemmanager.c.

Referenced by GetDraggedItem(), and SetDraggedItem().

◆ m_HandsDefaultOpenState

int m_HandsDefaultOpenState
protected

Definition at line 16 of file itemmanager.c.

Referenced by GetDefaultOpenStateHands(), and SetDefaultOpenStateHands().

◆ m_HandsPreview

HandsPreview m_HandsPreview
protected

Definition at line 26 of file itemmanager.c.

Referenced by GetHandsPreview(), and SetHandsPreview().

◆ m_HoveredItem

EntityAI m_HoveredItem
protected

Definition at line 5 of file itemmanager.c.

Referenced by GetHoveredItem(), HideTooltip(), and PrepareTooltip().

◆ m_Instance

ref ItemManager m_Instance
staticprivate

Definition at line 3 of file itemmanager.c.

Referenced by ItemManager(), and GetInstance().

◆ m_IsDragging

bool m_IsDragging
protected

Definition at line 4 of file itemmanager.c.

Referenced by IsDragging(), and SetIsDragging().

◆ m_ItemMicromanagmentMode

bool m_ItemMicromanagmentMode
protected

Definition at line 28 of file itemmanager.c.

Referenced by IsMicromanagmentMode(), and SetItemMicromanagmentMode().

◆ m_ItemPreviewWidget

ItemPreviewWidget m_ItemPreviewWidget
protected

Definition at line 12 of file itemmanager.c.

Referenced by PrepareTooltip(), and ShowTooltip().

◆ m_LeftDropzone

Widget m_LeftDropzone
protected

Definition at line 30 of file itemmanager.c.

Referenced by GetLeftDropzone().

◆ m_LeftSlotsScroller

ScrollWidget m_LeftSlotsScroller
protected

Definition at line 37 of file itemmanager.c.

Referenced by GetLeftSlotsScroller().

◆ m_RightDropzone

Widget m_RightDropzone
protected

Definition at line 32 of file itemmanager.c.

Referenced by GetRightDropzone().

◆ m_RootWidget

Widget m_RootWidget
protected

◆ m_SelectedBaseIcon

LayoutHolder m_SelectedBaseIcon
protected

Definition at line 24 of file itemmanager.c.

Referenced by SetSelectedItemEx().

◆ m_SelectedContainer

Container m_SelectedContainer
protected

Definition at line 21 of file itemmanager.c.

Referenced by GetSelectedContainer(), SetSelectedItem(), and SetSelectedItemEx().

◆ m_SelectedIcon

SlotsIcon m_SelectedIcon
protected

Definition at line 23 of file itemmanager.c.

Referenced by GetSelectedIcon(), and SetSelectedItem().

◆ m_SelectedItem

EntityAI m_SelectedItem
protected

Definition at line 20 of file itemmanager.c.

Referenced by GetSelectedItem(), SetSelectedItem(), and SetSelectedItemEx().

◆ m_SelectedWidget

Widget m_SelectedWidget
protected

Definition at line 22 of file itemmanager.c.

Referenced by GetSelectedWidget(), SetSelectedItem(), and SetSelectedItemEx().

◆ m_SlotInfoShown

bool m_SlotInfoShown
protected

Definition at line 6 of file itemmanager.c.

Referenced by ItemManager(), HideTooltipSlot(), and PrepareSlotsTooltip().

◆ m_TooltipCategoryWidget

ref Widget m_TooltipCategoryWidget
protected

Definition at line 11 of file itemmanager.c.

◆ m_TooltipPosX

int m_TooltipPosX
protected

Definition at line 34 of file itemmanager.c.

Referenced by CalculateTooltipSlotPosition(), and ShowTooltipSlot().

◆ m_TooltipPosY

int m_TooltipPosY
protected

Definition at line 35 of file itemmanager.c.

Referenced by CalculateTooltipSlotPosition(), and ShowTooltipSlot().

◆ m_TooltipSlotTimer

ref Timer m_TooltipSlotTimer
protected

Definition at line 18 of file itemmanager.c.

Referenced by HideTooltipSlot(), and PrepareSlotsTooltip().

◆ m_TooltipSlotWidget

ref Widget m_TooltipSlotWidget
protected

◆ m_TooltipSourceWidget

Widget m_TooltipSourceWidget
protected

◆ m_ToolTipTimer

ref Timer m_ToolTipTimer
protected

Definition at line 17 of file itemmanager.c.

Referenced by HideTooltip(), and PrepareTooltip().

◆ m_TooltipWidget

ref Widget m_TooltipWidget
protected

Definition at line 9 of file itemmanager.c.

Referenced by ItemManager(), HideTooltip(), PrepareTooltip(), and ShowTooltip().

◆ TOOLTIP_DELAY

const float TOOLTIP_DELAY = 0.25
protected

Definition at line 40 of file itemmanager.c.

Referenced by PrepareSlotsTooltip(), and PrepareTooltip().


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