DayZ Enforce
Script API
Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
InventoryManager Class Reference

#include <InventoryManager.h>

Private Member Functions

void  InventoryManager ()
 
void  ~InventoryManager ()
 
void  DropItem (InventoryItem item)
 
protected void  TryTakeToHands ()
 
void  TakeToHands (InventoryItem item)
 
void  TakeAsOwned (EntityAI entity1, EntityAI entity2)
 
void  Drag (int type, InventoryItem item, InventoryGrid grid)
 
void  Drop ()
 
void  SetItemColor (int color)
 
void  SetItemSize (int pixels_w, int pixels_h)
 
bool  IsDragging ()
 
InventoryItem  GetItem ()
 
InventoryGrid  GetGrid ()
 
void  OnPerformCraft (string recipe_name)
 
void  OnPerformCombination (int combinationFlags)
 
void  OnPerformAction (Action action)
 
void  InspectItem (InventoryItem item)
 
void  ShowActionMenu (InventoryItem item)
 
void  ShowActionMenuCombine (EntityAI entity1, EntityAI entity2, int combinationFlags)
 
void  UpdateEntityActions (EntityAI entity1, EntityAI entity2, array< Action > test)
 
int  GetCombinationFlags (EntityAI entity1, EntityAI entity2)
  Returns combionation of InventoryCombinationFlags. More...
 
float  GetNormalItemSize ()
 
float  GetAttachmentItemSize ()
 
float  GetIconItemSize ()
 
float  GetHandsNormalItemSize ()
 
float  GetHandsAttachmentItemSize ()
 
float  GetPanelsSize ()
 
float  GetQuantityStackPanelSize ()
 
void  RecalculateIconSize (float maxGridWidth)
 
void  ShowTooltip (EntityAI item)
 
void  HideTooltip ()
 
string  GetItemQuantityText (EntityAI item)
 
int  HasItemQuantity (EntityAI item)
 
float  GetItemQuantity (InventoryItem item)
 

Static Private Member Functions

static InventoryManager  GetInstance ()
 

Private Attributes

protected PlayerBase  m_player
 
private autoptr Timer  m_timer
 
protected autoptr Link< EntityAI m_entity_to_take
 
const float  MAX_CARGO_GRID_WIDTH = 10
 
const float  MAX_ATTACHMENT_GRID_WIDTH = 7
 
const float  MAX_HANDS_ATTACHMENT_GRID_WIDTH = 7
 
const float  GRID_CARGO_GAP = 1
 
const float  GRID_ATTACHMENT_GAP = 2
 
protected float  m_normal_item_size
 
protected float  m_hands_normal_item_size
 
protected float  m_attachment_item_size
 
protected float  m_hands_attachment_item_size
 
protected float  m_icon_item_size
 
protected float  m_quantity_stack_panel_size
 
protected float  m_panels_size
 
protected bool  m_is_dragging
 
protected autoptr Link< InventoryItem m_drag_item
 
protected InventoryGrid  m_grid
 
protected int  m_from_type
  InventoryDragFromType. More...
 
protected autoptr TActionRefArray  m_actions
 
protected autoptr Link< EntityAI m_am_entity1
 
protected autoptr Link< EntityAI m_am_entity2
 
protected int  m_am_itemes_combination_flags
 
protected int  m_am_pos_x
 
protected int  m_am_pos_y
 
private Widget  m_tooltip_widget
 
private ItemPreviewWidget  m_item_preview_widget
 

Static Private Attributes

static private InventoryManager  s_instance
 

Constructor & Destructor Documentation

void InventoryManager::InventoryManager ( )
private
void InventoryManager::~InventoryManager ( )
private

Member Function Documentation

void InventoryManager::DropItem ( InventoryItem  item )
private
void InventoryManager::TryTakeToHands ( )
private

References m_entity_to_take, m_player, and m_timer.

Referenced by TakeToHands().

void InventoryManager::TakeToHands ( InventoryItem  item )
private
void InventoryManager::TakeAsOwned ( EntityAI  entity1,
EntityAI  entity2 
)
private
void InventoryManager::Drag ( int  type,
InventoryItem  item,
InventoryGrid  grid 
)
private
void InventoryManager::Drop ( )
private
void InventoryManager::SetItemColor ( int  color )
private
void InventoryManager::SetItemSize ( int  pixels_w,
int  pixels_h 
)
private
bool InventoryManager::IsDragging ( )
private
InventoryItem InventoryManager::GetItem ( )
private
InventoryGrid InventoryManager::GetGrid ( )
private
void InventoryManager::OnPerformCraft ( string  recipe_name )
private
void InventoryManager::OnPerformCombination ( int  combinationFlags )
private
void InventoryManager::OnPerformAction ( Action  action )
private
void InventoryManager::InspectItem ( InventoryItem  item )
private
void InventoryManager::ShowActionMenu ( InventoryItem  item )
private
void InventoryManager::ShowActionMenuCombine ( EntityAI  entity1,
EntityAI  entity2,
int  combinationFlags 
)
private
void InventoryManager::UpdateEntityActions ( EntityAI  entity1,
EntityAI  entity2,
array< Action test 
)
private
int InventoryManager::GetCombinationFlags ( EntityAI  entity1,
EntityAI  entity2 
)
private
float InventoryManager::GetNormalItemSize ( )
private
float InventoryManager::GetAttachmentItemSize ( )
private
float InventoryManager::GetIconItemSize ( )
private

References m_icon_item_size.

Referenced by InventoryView::InitIconGrid().

float InventoryManager::GetHandsNormalItemSize ( )
private
float InventoryManager::GetHandsAttachmentItemSize ( )
private
float InventoryManager::GetPanelsSize ( )
private

References m_panels_size.

float InventoryManager::GetQuantityStackPanelSize ( )
private
void InventoryManager::RecalculateIconSize ( float  maxGridWidth )
private
void InventoryManager::ShowTooltip ( EntityAI  item )
private
void InventoryManager::HideTooltip ( )
private
static InventoryManager InventoryManager::GetInstance ( )
staticprivate

References s_instance.

Referenced by InventoryView::CreateLayout(), InventoryViewHands::CreateLayout(), InventoryViewBase::GetItemColor(), InventoryViewGrid::GetItemColor(), InventoryView::GetItemColor(), InventoryViewBase::GetItemQuantity(), InventoryViewGrid::GetItemQuantity(), InventoryView::GetItemQuantity(), InventoryViewBase::GetItemQuantityText(), InventoryViewGrid::GetItemQuantityText(), InventoryView::GetItemQuantityText(), InventoryViewBase::HasItemQuantity(), InventoryViewGrid::HasItemQuantity(), InventoryView::HasItemQuantity(), InventoryQuickbar::HasItemQuantity(), InventoryMenu::Init(), InventoryView::InitAttachmentGrid(), InventoryViewBase::InitCargoGrid(), InventoryView::InitCargoGrid(), InventoryViewGrid::InitIconGrid(), InventoryView::InitIconGrid(), InventoryViewHands::InitIconGrid(), InventoryViewBase::MoveItem(), InventoryView::MoveItem(), InventoryMenu::OnDraggingOver(), InventoryView::OnDraggingOver(), InventoryContainerEntity::OnDraggingOver(), InventoryContainerVicinity::OnDraggingOver(), InventoryContainerHands::OnDraggingOver(), InventoryMenu::OnDropReceived(), InventoryView::OnDropReceived(), InventoryContainerEntity::OnDropReceived(), InventoryContainerVicinity::OnDropReceived(), InventoryContainerHands::OnDropReceived(), MissionGameplay::OnEvent(), InventoryMenu::OnHide(), InventoryViewBase::OnItemDoubleClick(), InventoryViewGrid::OnItemDoubleClick(), InventoryView::OnItemDoubleClick(), InventoryContainer::OnItemDoubleClick(), InventoryContainerHands::OnItemDoubleClick(), InventoryViewGrid::OnItemDrag(), InventoryView::OnItemDrag(), InventoryView::OnItemDraggingOver(), InventoryQuickbar::OnItemDraggingOver(), InventoryViewBase::OnItemDrop(), InventoryViewGrid::OnItemDrop(), InventoryView::OnItemDrop(), InventoryViewBase::OnItemDropReceived(), InventoryViewGrid::OnItemDropReceived(), InventoryView::OnItemDropReceived(), InventoryQuickbar::OnItemDropReceived(), InventoryViewGrid::OnItemEnter(), InventoryView::OnItemEnter(), InventoryViewGrid::OnItemLeave(), InventoryView::OnItemLeave(), InventoryViewBase::OnItemRightClick(), InventoryViewGrid::OnItemRightClick(), InventoryView::OnItemRightClick(), InventoryViewGrid::OnMouseButtonDown(), InventoryView::UpdateAttachmentGrid(), InventoryView::UpdateHeight(), InventoryViewGrid::UpdateItems(), InventoryView::UpdateItems(), and InventoryViewHands::UpdateItems().

string InventoryManager::GetItemQuantityText ( EntityAI  item )
private
int InventoryManager::HasItemQuantity ( EntityAI  item )
private
float InventoryManager::GetItemQuantity ( InventoryItem  item )
private

Member Data Documentation

private InventoryManager InventoryManager::s_instance
staticprivate
protected PlayerBase InventoryManager::m_player
private
private autoptr Timer InventoryManager::m_timer
private
protected autoptr Link<EntityAI> InventoryManager::m_entity_to_take
private
const float InventoryManager::MAX_CARGO_GRID_WIDTH = 10
private

Referenced by RecalculateIconSize().

const float InventoryManager::MAX_ATTACHMENT_GRID_WIDTH = 7
private
const float InventoryManager::MAX_HANDS_ATTACHMENT_GRID_WIDTH = 7
private
const float InventoryManager::GRID_CARGO_GAP = 1
private
const float InventoryManager::GRID_ATTACHMENT_GAP = 2
private
protected float InventoryManager::m_normal_item_size
private
protected float InventoryManager::m_hands_normal_item_size
private
protected float InventoryManager::m_attachment_item_size
private
protected float InventoryManager::m_hands_attachment_item_size
private
protected float InventoryManager::m_icon_item_size
private
protected float InventoryManager::m_quantity_stack_panel_size
private
protected float InventoryManager::m_panels_size
private

Referenced by GetPanelsSize().

protected bool InventoryManager::m_is_dragging
private
protected autoptr Link<InventoryItem> InventoryManager::m_drag_item
private
protected InventoryGrid InventoryManager::m_grid
private
protected int InventoryManager::m_from_type
private

InventoryDragFromType.

Referenced by Drag().

protected autoptr TActionRefArray InventoryManager::m_actions
private
protected autoptr Link<EntityAI> InventoryManager::m_am_entity1
private
protected autoptr Link<EntityAI> InventoryManager::m_am_entity2
private
protected int InventoryManager::m_am_itemes_combination_flags
private

Referenced by ShowActionMenuCombine().

protected int InventoryManager::m_am_pos_x
private
protected int InventoryManager::m_am_pos_y
private
private Widget InventoryManager::m_tooltip_widget
private
private ItemPreviewWidget InventoryManager::m_item_preview_widget
private

Referenced by HideTooltip(), and ShowTooltip().


The documentation for this class was generated from the following files:
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)