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

Private Member Functions

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

Static Private Member Functions

static ItemManager GetInstance ()
 
static int GetItemHealthColor (int pHealthLevel)
 
static int GetItemHealthColor (EntityAI item, string zone="")
 
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 int GetRecipeCount (bool recipe_anywhere, EntityAI entity1, EntityAI entity2)
 

Private Attributes

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

Static Private Attributes

private static ref ItemManager m_Instance
 

Constructor & Destructor Documentation

◆ ItemManager()

Member Function Documentation

◆ CalculateTooltipSlotPosition()

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

◆ ClearDefaultHeaderOpenStates()

void ClearDefaultHeaderOpenStates ( )
inlineprivate

◆ ClearDefaultOpenStates()

void ClearDefaultOpenStates ( )
inlineprivate

◆ ColorFromFloat()

static int ColorFromFloat ( float  fraction)
inlinestaticprivate

◆ DeserializeDefaultHeaderOpenStates()

void DeserializeDefaultHeaderOpenStates ( )
inlineprivate

◆ DeserializeDefaultOpenStates()

void DeserializeDefaultOpenStates ( )
inlineprivate

◆ EvaluateContainerDragabilityDefault()

bool EvaluateContainerDragabilityDefault ( EntityAI  entity)
inlineprivate

◆ GetCenterDropzone()

◆ GetChosenCombinationFlag()

◆ GetCombinationFlags()

◆ GetDefaultHeaderOpenState()

bool GetDefaultHeaderOpenState ( string  type)
inlineprivate

◆ GetDefaultOpenState()

bool GetDefaultOpenState ( string  type)
inlineprivate

References m_DefautOpenStates.

◆ GetDefaultOpenStateHands()

bool GetDefaultOpenStateHands ( )
inlineprivate

◆ GetDraggedIcon()

Icon GetDraggedIcon ( )
inlineprivate

References m_DraggedIcon.

Referenced by Icon::Swap().

◆ GetDraggedItem()

◆ GetHandsPreview()

HandsPreview GetHandsPreview ( )
inlineprivate

◆ GetHoveredItem()

EntityAI GetHoveredItem ( )
inlineprivate

References m_HoveredItem.

Referenced by UpdateInterval().

◆ GetInstance()

static ItemManager GetInstance ( )
inlinestaticprivate

References m_Instance.

Referenced by LayoutHolder::CanAddToQuickbarEx(), LayoutHolder::CanCombineEx(), LayoutHolder::CanDropEx(), LayoutHolder::CanEquipEx(), LayoutHolder::CanOpenCloseContainer(), LayoutHolder::CanSplitEx(), LayoutHolder::CanSwapOrTakeToHandsEx(), LayoutHolder::CanTakeToInventoryEx(), SlotsIcon::ClearRemainSelected(), Container::Close(), ClosableContainer::Close(), VicinityContainer::CollapseButtonOnMouseButtonDown(), Attachments::Combine(), PlayerContainer::Combine(), VicinitySlotsContainer::Combine(), Icon::Combine(), Icon::CreateWhiteBackground(), Deserialize(), Icon::DestroyWhiteBackground(), DisableMicromanagement(), Icon::DraggingOver(), ClosableContainer::DraggingOver(), PlayerContainer::DraggingOver(), DraggingOverCenterPanel(), ClosableContainer::DraggingOverGrid(), HandsContainer::DraggingOverGrid(), ClosableContainer::DraggingOverGrid(), HandsArea::DraggingOverHandsPanel(), DraggingOverHandsPanel(), HandsContainer::DraggingOverHeader(), AttachmentCategoriesContainer::DraggingOverHeader(), AttachmentCategoriesRow::DraggingOverHeader(), ClosableContainer::DraggingOverHeader(), PlayerContainer::DraggingOverHeader(), VicinityContainer::DraggingOverHeader(), VicinityContainer::DraggingOverIcon(), Icon::DraggingOverSwap(), ClosableContainer::DropReceived(), HandsContainer::DropReceived(), ClosableContainer::DropReceived(), Icon::DropReceivedFromMain(), EnableMicromanagement(), ColorManager::GetItemColor(), HandsContainer::HandsContainer(), ScriptedWidgetEventHandler::HideOwnedSlotsTooltip(), ScriptedWidgetEventHandler::HideOwnedTooltip(), Icon::Icon(), SlotsIcon::Init(), Icon::InitLock(), CollapsibleContainer::LoadDefaultState(), VicinitySlotsContainer::MouseButtonDown(), Icon::MouseClick(), AttachmentCategoriesRow::MouseClick(), PlayerContainer::MouseClick(), ZombieContainer::MouseClick(), HandsContainer::MouseClick2(), ClosableContainer::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(), Container::Open(), ClosableContainer::Open(), ScriptedWidgetEventHandler::PrepareOwnedSlotsTooltip(), ScriptedWidgetEventHandler::PrepareOwnedTooltip(), AttachmentCategoriesRow::RefreshSlot(), Attachments::Select(), Container::Select(), HandsPreview::Select(), AttachmentCategoriesRow::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(), HandsContainer::TakeAsAttachment(), ClosableContainer::TakeAsAttachment(), PlayerContainer::ToggleWidget(), UpdateConsoleToolbar(), Icon::UpdateFrameColor(), VicinityContainer::UpdateHeader(), Attachments::UpdateInterval(), HandsPreview::UpdateInterval(), ClosableContainer::UpdateInterval(), VicinityContainer::UpdateInterval(), UpdateInterval(), IconsContainer::UpdateItemsTemperature(), Icon::~Icon(), and SlotsIcon::~SlotsIcon().

◆ GetItemHealthColor() [1/2]

◆ GetItemHealthColor() [2/2]

◆ GetLeftDropzone()

◆ GetLeftSlotsScroller()

ScrollWidget GetLeftSlotsScroller ( )
inlineprivate

◆ GetRecipeCount()

static int GetRecipeCount ( bool  recipe_anywhere,
EntityAI  entity1,
EntityAI  entity2 
)
inlinestaticprivate

References GetGame(), GetPlayer(), and GetPlugin().

◆ GetRightDropzone()

◆ GetSelectedContainer()

Container GetSelectedContainer ( )
inlineprivate

References m_SelectedContainer.

Referenced by Container::Select().

◆ GetSelectedIcon()

SlotsIcon GetSelectedIcon ( )
inlineprivate

◆ GetSelectedItem()

◆ GetSelectedWidget()

Widget GetSelectedWidget ( )
inlineprivate

References m_SelectedWidget.

◆ HideDropzones()

◆ HideTooltip()

◆ HideTooltipSlot()

void HideTooltipSlot ( )
inlineprivate

◆ IsDragging()

◆ IsMicromanagmentMode()

◆ PrepareSlotsTooltip()

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

position is currentlycalculated from the owning 'm_TooltipSourceWidget' directly

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

Referenced by ScriptedWidgetEventHandler::PrepareOwnedSlotsTooltip().

◆ PrepareTooltip()

◆ SerializeDefaultHeaderOpenStates()

void SerializeDefaultHeaderOpenStates ( )
inlineprivate

◆ SerializeDefaultOpenStates()

void SerializeDefaultOpenStates ( )
inlineprivate

◆ SetDefaultHeaderOpenState()

void SetDefaultHeaderOpenState ( string  type,
bool  is_opened 
)
inlineprivate

◆ SetDefaultOpenState()

◆ SetDefaultOpenStateHands()

void SetDefaultOpenStateHands ( bool  is_opened)
inlineprivate

◆ SetDraggedIcon()

void SetDraggedIcon ( Icon  dragged_icon)
inlineprivate

◆ SetDraggedItem()

void SetDraggedItem ( EntityAI  dragged_item)
inlineprivate

◆ SetHandsPreview()

void SetHandsPreview ( HandsPreview  hansd_preview)
inlineprivate

◆ SetIconTemperature()

void SetIconTemperature ( EntityAI  item,
Widget  item_w 
)
inlineprivate

Referenced by Icon::SetTemperature().

◆ SetIsDragging()

◆ SetItemMicromanagmentMode()

void SetItemMicromanagmentMode ( bool  item_micromanagment_mode)
inlineprivate

◆ SetSelectedItem()

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

◆ SetSelectedItemEx()

◆ SetTemperature()

void SetTemperature ( EntityAI  item,
Widget  item_w 
)
inlineprivate

References name.

Referenced by SlotsIcon::SetTemperature().

◆ SetTooltipWidget()

void SetTooltipWidget ( Widget  w)
inlineprivate

◆ SetWidgetDraggable()

◆ ShowSourceDropzone()

◆ ShowTooltip()

void ShowTooltip ( )
inlineprivate

◆ ShowTooltipSlot()

void ShowTooltipSlot ( )
inlineprivate

◆ UpdateTooltipSlotPosition()

void UpdateTooltipSlotPosition ( )
inlineprivate

Field Documentation

◆ m_CenterDropzone

protected Widget m_CenterDropzone
private

Referenced by GetCenterDropzone().

◆ m_DefautHeaderOpenStates

◆ m_DefautOpenStates

◆ m_DraggedIcon

protected Icon m_DraggedIcon
private

Referenced by GetDraggedIcon(), and SetDraggedIcon().

◆ m_DraggedItem

protected EntityAI m_DraggedItem
private

Referenced by GetDraggedItem(), and SetDraggedItem().

◆ m_HandsDefaultOpenState

protected int m_HandsDefaultOpenState
private

◆ m_HandsPreview

protected HandsPreview m_HandsPreview
private

Referenced by GetHandsPreview(), and SetHandsPreview().

◆ m_HoveredItem

protected EntityAI m_HoveredItem
private

◆ m_Instance

private static ref ItemManager m_Instance
staticprivate

Referenced by GetInstance(), and ItemManager().

◆ m_IsDragging

protected bool m_IsDragging
private

Referenced by IsDragging(), and SetIsDragging().

◆ m_ItemMicromanagmentMode

protected bool m_ItemMicromanagmentMode
private

◆ m_ItemPreviewWidget

protected ItemPreviewWidget m_ItemPreviewWidget
private

Referenced by PrepareTooltip(), and ShowTooltip().

◆ m_LeftDropzone

protected Widget m_LeftDropzone
private

Referenced by GetLeftDropzone().

◆ m_LeftSlotsScroller

protected ScrollWidget m_LeftSlotsScroller
private

Referenced by GetLeftSlotsScroller().

◆ m_RightDropzone

protected Widget m_RightDropzone
private

Referenced by GetRightDropzone().

◆ m_RootWidget

◆ m_SelectedBaseIcon

protected LayoutHolder m_SelectedBaseIcon
private

Referenced by SetSelectedItemEx().

◆ m_SelectedContainer

protected Container m_SelectedContainer
private

◆ m_SelectedIcon

protected SlotsIcon m_SelectedIcon
private

Referenced by GetSelectedIcon(), and SetSelectedItem().

◆ m_SelectedItem

protected EntityAI m_SelectedItem
private

◆ m_SelectedWidget

protected Widget m_SelectedWidget
private

◆ m_SlotInfoShown

protected bool m_SlotInfoShown
private

◆ m_TooltipCategoryWidget

protected ref Widget m_TooltipCategoryWidget
private

◆ m_TooltipPosX

protected int m_TooltipPosX
private

◆ m_TooltipPosY

protected int m_TooltipPosY
private

◆ m_TooltipSlotTimer

protected ref Timer m_TooltipSlotTimer
private

◆ m_TooltipSlotWidget

protected ref Widget m_TooltipSlotWidget
private

◆ m_TooltipSourceWidget

protected Widget m_TooltipSourceWidget
private

◆ m_ToolTipTimer

protected ref Timer m_ToolTipTimer
private

Referenced by HideTooltip(), and PrepareTooltip().

◆ m_TooltipWidget

protected ref Widget m_TooltipWidget
private

◆ TOOLTIP_DELAY

protected const float TOOLTIP_DELAY = 0.25
private

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