16 super.InitIconWidgets(parent,root,index,slot_parent);
19 m_ImageBackdrop.Show(
true);
29 super.ResetIconValues();
36 super.Init(obj, reservation);
59 super.InitIcon(parent,root,index,slot_parent);
66 string iconPath =
"set:dayz_inventory image:missing";
69 case EConstructionTools.TOOL_MOUNT_WIRE:
70 iconPath =
"set:dayz_inventory image:plierstools";
73 case EConstructionTools.TOOL_NAIL:
74 iconPath =
"set:dayz_inventory image:hammertools";
77 case EConstructionTools.TOOL_DIG_BASE:
78 iconPath =
"set:dayz_inventory image:shoveltools";
81 case EConstructionTools.TOOL_MOUNT_LOG:
82 iconPath =
"set:dayz_inventory image:hammertools";
85 case EConstructionTools.TOOL_HEAVY:
86 iconPath =
"set:dayz_inventory image:sladgehammertools";
89 case EConstructionTools.TOOL_EXCAVATION:
90 iconPath =
"set:dayz_inventory image:pickaxetools";
93 case EConstructionTools.TOOL_HANDS:
94 iconPath =
"set:dayz_inventory image:hands";
95 m_GhostSlot.SetColor(0xD0FFFFFF);
98 case EConstructionTools.TOOL_BRICKLAYING:
99 iconPath =
"set:dayz_inventory image:bricklayingtools";
103 m_GhostSlot.LoadImageFile(0, iconPath);
104 m_GhostSlot.SetImage(0);
109 super.ResetIconValues();
127 m_CrossedImage.Show(show);
137 bool highlight = (m_IconIndex == EConstructionTools.TOOL_HANDS && !
m_Tool) || (m_IconIndex != EConstructionTools.TOOL_HANDS &&
m_Tool != null);
148 m_ColWidget.Show(highlight);
157 super.UpdateInterval();
161class ConstructionMaterialInfoIcon: ConstructionInfoIcon
172 super.InitIcon(parent,root,index,slot_parent);
187 string iconName =
"set:dayz_inventory image:missing";
188 string path =
"CfgSlots" +
" Slot_" +
m_MaterialData.m_MaterialSlotName +
" ghostIcon";
191 m_GhostSlot.LoadImageFile(0,iconName);
192 m_GhostSlot.SetImage(0);
209 super.SetConstructionPart(part);
214 super.ResetIconValues();
294 super.UpdateInterval();
307 float lastQuantity = m_CurrQuantity;
309 if (lastQuantity == m_CurrQuantity)
312 string color1, color2;
317 bool sufficient = m_CurrQuantity >= requiredQty;
320 m_ColWidget.Show(sufficient);
321 m_ItemPreview.Show(sufficient);
322 m_GhostSlot.Show(!sufficient);
329 string iconPath =
m_Item.GetInventoryItemType().GetGhostIconImagepath();
332 m_GhostSlot.LoadImageFile(1, iconPath,
false);
333 m_GhostSlot.SetImage(1);
334 m_GhostSlot.SetColor(0xFFFFFFFF);
343 m_QuantityStack.Show(requiredQty != 1);
344 m_QuantityProgress.Show(
false);
347 RichTextWidget.Cast(m_QuantityItem).SetText(
string.Format(
"<color hex=\"%1\">%2</color><color hex=\"%3\">/%4</color>", color1, m_CurrQuantity.
ToString(), color2, requiredQty.
ToString()));
365 super.ClearRemainSelected();
367 m_GhostSlot.SetImage(0);
376 m_QuantityPanel.Show(
true);
379 m_QuantityItem.Show(
true);
380 m_QuantityStack.Show(
true);
381 m_QuantityProgress.Show(
false);
382 m_PanelWidget.Show(
true);
383 m_ItemPreview.Show(
false);
override void UpdateInterval()
void SetConstructionPart(ConstructionPart part)
eConstructionIconItemState
const string QUANTITY_TEXT_COLOR_LIGHTER_ARGB
void InitIcon(LayoutHolder parent, Widget root, int index, EntityAI slot_parent)
void SetTargetEntity(EntityAI targetEnt)
EntityAI m_TargetedEntity
void InitIconWidgets(LayoutHolder parent, Widget root, int index, EntityAI slot_parent)
int GetContextualSlotMax()
int m_LastSufficientMaterialState
ConstructionMaterialData m_MaterialData
override void SetQuantity()
override void ClearRemainSelected()
override void ResetIconValues()
eConstructionIconItemState m_ItemState
ConstructionToolInfoIcon QUANTITY_TEXT_COLOR_DARKER_ARGB
enum eConstructionIconItemState m_OriginalGhostIconColor
bool m_ProcessDataChanges
bool CheckDisplayableAttachment()
void ConstructionPart(string name, string part_name, string main_part_name, int id, bool is_built, bool is_base, bool is_gate, array< string > required_parts)
instanced data holder for single construction material
Instanced construction part data classes for dynamic data, statics now stored on EntityType level in ...
const int INVALID
Invalid slot (-1)
provides access to slot configuration
static float GetItemQuantity(InventoryItem item)
static int HasItemQuantity(notnull EntityAI item)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
const int QUANTITY_HIDDEN
static proto string ToString(void var, bool type=false, bool name=false, bool quotes=true)
Return string representation of variable.