DayZ 1.24
Loading...
Searching...
No Matches
Tabber.c
Go to the documentation of this file.
1// -----------------------------------------------------------
3{
7
8 // -----------------------------------------------------------
10 {
11 w.SetHandler(this);
13 }
14
15 // -----------------------------------------------------------
16 override bool OnClick(Widget w, int x, int y, int button)
17 {
18 if (w && w.GetParent() == ButtonsPanel)
19 {
20 SelectedTab = 0;
21 Widget iw = ButtonsPanel.GetChildren();
22 while (iw)
23 {
24 if (iw == w) break;
26 iw = iw.GetSibling();
27 }
28
30 }
31
32 return false;
33 }
34
35 // -----------------------------------------------------------
36 protected void SelectTab(int index)
37 {
38 Print(index);
39 int n = 0;
40 Widget w = ContentPanel.GetChildren();
41 while (w)
42 {
43 if (n == index)
44 w.Show(true);
45 else
46 w.Show(false);
47 n++;
48 w = w.GetSibling();
49 }
50 }
51};
Icon x
Icon y
map: item x vector(index, width, height)
Definition EnWidgets.c:651
Definition Tabber.c:3
Widget ButtonsPanel
Definition Tabber.c:4
void OnWidgetScriptInit(Widget w)
Definition Tabber.c:9
override bool OnClick(Widget w, int x, int y, int button)
Definition Tabber.c:16
reference int SelectedTab
Definition Tabber.c:6
Widget ContentPanel
Definition Tabber.c:5
void SelectTab(int index)
Definition Tabber.c:36
proto void Print(void var)
Prints content of variable to console/log.