DayZ 1.24
Loading...
Searching...
No Matches
AttachmentsGroupContainer.c
Go to the documentation of this file.
2{
4
5 override void SetLayoutName()
6 {
8 }
9
10 override void SetHeader(Header header)
11 {
13 m_Header.GetMainWidget().SetFlags(WidgetFlags.IGNOREPOINTER);
14 }
15
16 override Header GetHeader()
17 {
18 return m_Header;
19 }
20
22 {
23 m_FocusedColumn = 0;
24 }
25
26 override void SetActive(bool active)
27 {
28 super.SetActive(active);
29 if (!active)
30 m_FocusedColumn = 0;
31 }
32
33 override void SetDefaultFocus(bool while_micromanagment_mode = false)
34 {
35 super.SetDefaultFocus();
36 m_FocusedColumn = 0;
37 }
38
40 {
43 c = SlotsContainer.Cast(m_Body[row]);
44 else
45 c = SlotsContainer.Cast(m_OpenedContainers[row]);
46 return c.GetSlotIcon(column);
47 }
48
50 {
52 return m_Body.Count();
53 else
54 return m_OpenedContainers.Count();
55 }
56
58 {
61 c = Container.Cast(m_Body[row]);
62 else
63 c = Container.Cast(m_OpenedContainers[row]);
64 return c.GetColumnCount();
65 }
66
67 override void SetNextActive()
68 {
69 HideOwnedTooltip();
70 int visible_focus = 0;
71
73 if (m_OpenedContainers.Count())
74 active = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
75
76 if (active && active.IsActive())
77 {
78 visible_focus = active.GetVisibleFocus();
79 active.SetNextActive();
80 }
81 if (!active || !active.IsActive())
82 {
84 if (!IsLastContainerFocused())
85 {
86 m_ActiveIndex++;
87
88 //int visible_focus = active.GetVisibleFocus();
89
90 next = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
91 next.SetActive(true);
92 next.SetVisibleFocus(visible_focus);
93 }
94 else if (Container.Cast(GetParent()))
95 SetActive(false);
96 else
97 {
98 SetActive(false);
99 SetFirstActive();
100 }
101 }
102 }
103
104 override void SetPreviousActive(bool force = false)
105 {
106 HideOwnedTooltip();
107 int visible_focus = 0;
108
110 if (m_OpenedContainers.Count())
111 active = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
112
113 if (active && active.IsActive())
114 {
115 visible_focus = active.GetVisibleFocus();
116 active.SetPreviousActive();
117 }
118
119 if (!active || !active.IsActive())
120 {
122 if (!IsFirstContainerFocused())
123 {
124 m_ActiveIndex--;
125
126 prev = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
127 prev.SetActive(true);
128 prev.SetVisibleFocus(visible_focus);
129 }
130 else if (Container.Cast(GetParent()))
131 SetActive(false);
132 else
133 {
134 SetActive(false);
136 }
137 }
138 }
139}
void SetActive()
Definition TrapBase.c:409
override void SetPreviousActive(bool force=false)
int GetRowCount(bool include_invisible=true)
override void SetHeader(Header header)
override void SetDefaultFocus(bool while_micromanagment_mode=false)
void AttachmentsGroupContainer(LayoutHolder parent)
int GetColumnCountForRow(int row, bool include_invisible=true)
override void SetActive(bool active)
SlotsIcon GetSlotsIcon(int row, int column, bool include_invisible=true)
override void SetLastActive()
Definition Header.c:2
const string AttachmentsGroupContainer
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:389
WidgetFlags
Definition EnWidgets.c:58