DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
AttachmentsGroupContainer.c
См. документацию.
2{
4
5 override void SetLayoutName()
6 {
8 }
9
10 override void SetHeader(Header header)
11 {
12 m_Header = header;
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 {
31 m_FocusedColumn = 0;
32 }
33 }
34
35 override void SetDefaultFocus(bool while_micromanagment_mode = false)
36 {
37 super.SetDefaultFocus();
38 m_FocusedColumn = 0;
39 }
40
41 SlotsIcon GetSlotsIcon(int row, int column, bool include_invisible = true )
42 {
44 if (include_invisible)
45 {
46 c = SlotsContainer.Cast(m_Body[row]);
47 }
48 else
49 {
50 c = SlotsContainer.Cast(m_OpenedContainers[row]);
51 }
52 return c.GetSlotIcon(column);
53 }
54
55 int GetRowCount(bool include_invisible = true)
56 {
57 if (include_invisible)
58 {
59 return m_Body.Count();
60 }
61 else
62 {
63 return m_OpenedContainers.Count();
64 }
65 }
66
67 int GetColumnCountForRow(int row, bool include_invisible = true)
68 {
69 Container c;
70 if (include_invisible)
71 {
72 c = Container.Cast(m_Body[row]);
73 }
74 else
75 {
76 c = Container.Cast(m_OpenedContainers[row]);
77 }
78 return c.GetColumnCount();
79 }
80
81 override void SetNextActive()
82 {
83 HideOwnedTooltip();
84 int visible_focus = 0;
85
86 SlotsContainer active;
87 if (m_OpenedContainers.Count())
88 {
89 active = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
90 }
91
92 if (active && active.IsActive())
93 {
94 visible_focus = active.GetVisibleFocus();
95 active.SetNextActive();
96 }
97 if (!active || !active.IsActive())
98 {
99 SlotsContainer next;
100 if (!IsLastContainerFocused())
101 {
102 m_ActiveIndex++;
103
104 //int visible_focus = active.GetVisibleFocus();
105
106 next = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
107 next.SetActive(true);
108 next.SetVisibleFocus(visible_focus);
109 }
110 else if (Container.Cast( GetParent() ))
111 {
112 SetActive(false);
113 }
114 else
115 {
116 SetActive(false);
117 SetFirstActive();
118 }
119 }
120 }
121
122 override void SetPreviousActive(bool force = false)
123 {
124 HideOwnedTooltip();
125 int visible_focus = 0;
126
127 SlotsContainer active;
128 if (m_OpenedContainers.Count())
129 {
130 active = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
131 }
132
133 if (active && active.IsActive())
134 {
135 visible_focus = active.GetVisibleFocus();
136 active.SetPreviousActive();
137 }
138
139 if (!active || !active.IsActive())
140 {
141 SlotsContainer prev;
142 if (!IsFirstContainerFocused())
143 {
144 m_ActiveIndex--;
145
146 prev = SlotsContainer.Cast(m_OpenedContainers[m_ActiveIndex]);
147 prev.SetActive(true);
148 prev.SetVisibleFocus(visible_focus);
149 }
150 else if (Container.Cast( GetParent() ))
151 {
152 SetActive(false);
153 }
154 else
155 {
156 SetActive(false);
158 }
159 }
160 }
161}
void SetActive()
Определения TrapBase.c:414
override void SetPreviousActive(bool force=false)
Определения AttachmentsGroupContainer.c:122
int GetRowCount(bool include_invisible=true)
Определения AttachmentsGroupContainer.c:55
override Header GetHeader()
Определения AttachmentsGroupContainer.c:16
override void SetHeader(Header header)
Определения AttachmentsGroupContainer.c:10
override void SetLayoutName()
Определения AttachmentsGroupContainer.c:5
override void SetNextActive()
Определения AttachmentsGroupContainer.c:81
override void SetDefaultFocus(bool while_micromanagment_mode=false)
Определения AttachmentsGroupContainer.c:35
void AttachmentsGroupContainer(LayoutHolder parent)
Определения AttachmentsGroupContainer.c:21
int GetColumnCountForRow(int row, bool include_invisible=true)
Определения AttachmentsGroupContainer.c:67
override void SetActive(bool active)
Определения AttachmentsGroupContainer.c:26
SlotsIcon GetSlotsIcon(int row, int column, bool include_invisible=true)
Определения AttachmentsGroupContainer.c:41
override void SetActive(bool active)
Определения CargoContainer.c:769
override void SetNextActive()
Определения CargoContainer.c:647
override void SetPreviousActive(bool force=false)
Определения CargoContainer.c:668
override void SetLastActive()
Определения CargoContainer.c:744
Определения CargoContainer.c:3
Определения Header.c:2
Определения Container.c:2
SlotsIcon GetSlotIcon(int index)
Определения SlotsContainer.c:207
int GetVisibleFocus()
Определения SlotsContainer.c:75
void SetVisibleFocus(int index)
Определения SlotsContainer.c:54
Определения SlotsContainer.c:2
Определения SlotsIcon.c:2
const string AttachmentsGroupContainer
Определения WidgetLayoutName.c:50
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:407
WidgetFlags
Определения EnWidgets.c:58