DayZ 1.24
Loading...
Searching...
No Matches
AttachmentCategoriesSlotsContainer.c
Go to the documentation of this file.
2{
4
6 {
8 m_Body.Insert(m_ItemsCont);
9 m_ItemsCont.GetMainWidget().SetUserID(index);
10
11 for (int k = 0; k < ITEMS_IN_ROW; k++)
12 {
13 //WidgetEventHandler.GetInstance().RegisterOnDropReceived( m_ItemsCont.GetSlotIcon( k ).GetMainWidget(), m_Parent, "OnDropReceivedFromHeader" );
14 //WidgetEventHandler.GetInstance().RegisterOnDropReceived( m_ItemsCont.GetSlotIcon( k ).GetPanelWidget(), m_Parent, "OnDropReceivedFromHeader" );
15
16 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(m_ItemsCont.GetSlotIcon(k).GetMainWidget(), m_Parent, "DraggingOverHeader");
17 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(m_ItemsCont.GetSlotIcon(k).GetPanelWidget(), m_Parent, "DraggingOverHeader");
18
19 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown(m_ItemsCont.GetSlotIcon(k).GetMainWidget(), m_Parent, "MouseClick");
20 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown(m_ItemsCont.GetSlotIcon(k).GetPanelWidget(), m_Parent, "MouseClick");
21
22 WidgetEventHandler.GetInstance().RegisterOnMouseEnter(m_ItemsCont.GetSlotIcon(k).GetMainWidget(), m_ItemsCont.GetSlotIcon(k), "MouseEnterGhostSlot");
23 WidgetEventHandler.GetInstance().RegisterOnMouseLeave(m_ItemsCont.GetSlotIcon(k).GetMainWidget(), m_ItemsCont.GetSlotIcon(k), "MouseLeaveGhostSlot");
24
25 m_ItemsCont.GetSlotIcon(k).GetMainWidget().SetUserID(k);
26 m_ItemsCont.GetSlotIcon(k).GetPanelWidget().SetUserID(k);
27 }
28 }
29
30 override bool IsDisplayable()
31 {
32 for (int i = 0; i < m_Body.Count(); i++)
33 {
34 LayoutHolder c = m_Body[i];
35 if (c && c.IsDisplayable())
36 return true;
37 }
38 return false;
39 }
40
41 override void SetLayoutName()
42 {
43 m_LayoutName = WidgetLayoutName.Container;
44 }
45
50
52 {
53 return m_ItemsCont.GetFocusedSlotsIcon().GetRender().GetItem();
54 }
55
57 {
58 return m_ItemsCont.GetMainWidget().GetUserID();
59 }
60
62 {
63 return m_ItemsCont.GetFocusedSlotsIcon().GetMainWidget().GetUserID();
64 }
65
67 {
68 m_ItemsCont.GetFocusedSlotsIcon().GetRadialIcon().Show(expand);
69 m_ItemsCont.GetFocusedSlotsIcon().GetRadialIconClosed().Show(!expand);
70 }
71
72 override bool SelectItem()
73 {
74 return false;
75 }
76
77 override bool Select()
78 {
79 return false;
80 }
81
82 override bool Combine()
83 {
84 return false;
85 }
86
87 override bool TransferItemToVicinity()
88 {
89 return false;
90 }
91
92 override bool TransferItem()
93 {
94 return false;
95 }
96
97 override bool SplitItem()
98 {
99 return false;
100 }
101
102 override bool EquipItem()
103 {
104 return false;
105 }
106
107 override bool CanCombine()
108 {
109 return false;
110 }
111
112 override bool CanCombineAmmo()
113 {
114 return false;
115 }
116
117 override bool IsEmpty()
118 {
119 return false;
120 }
121
122 override bool IsItemActive()
123 {
124 return false;
125 }
126
128 {
129 return false;
130 }
131
138
140 {
142 string icon_name;
143 GetGame().ConfigGetText(icon_path, icon_name);
144 return icon_name;
145 }
146
147 /*override void Refresh()
148 {
149 super.Refresh();
150 Print("DbgTest | Refresh");
151
152 CollapsibleContainer cont = CollapsibleContainer.Cast(m_Parent);
153 if (cont)
154 {
155 bool b1 = m_ItemsCont.VerifySlotsIconVisibility();
156 Print("DbgTest | Refresh | b1: " + b1);
157 cont.SetCollapsibleHeaderArrowState(!b1);
158 }
159 }*/
160}
const int ITEMS_IN_ROW
Definition Attachments.c:1
Widget m_Parent
Definition SizeToChild.c:86
string GetAttachmentCategory(string config_path_attachment_categories, int i)
void AttachmentCategoriesSlotsContainer(LayoutHolder parent, int index)
string GetIconName(string config_path_attachment_categories, string attachment_category)
static WidgetEventHandler GetInstance()
const string Container
proto native CGame GetGame()