Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
horizontalspacer.c
Go to the documentation of this file.
1
// -----------------------------------------------------------
2
class
HorizontalSpacer
:
SpacerBase
3
{
4
reference
int
Border
;
5
reference
int
Gap
;
6
7
override
protected
void
UpdateChild
(
Widget
child,
float
w,
float
h,
int
index)
8
{
9
float
itemWidth = (w - (
Border
* 2) - ((
m_count
- 1) *
Gap
)) /
m_count
;
10
float
itemHeight = h - (2 *
Border
);
11
12
child.SetPos(
Border
+ ((itemWidth +
Gap
) * index),
Border
);
13
child.SetSize(itemWidth, itemHeight);
14
15
if
(child.GetChildren())
16
{
17
Widget
c = child.GetChildren();
18
RightGap
gap;
19
c.GetScript(gap);
20
if
(gap)
21
gap.
OnUpdate
(c);
22
23
//gap.Update();
24
25
}
26
}
27
};
HorizontalSpacer
Definition
horizontalspacer.c:3
HorizontalSpacer::UpdateChild
void UpdateChild(Widget child, float w, float h, int index)
Definition
horizontalspacer.c:7
HorizontalSpacer::Gap
reference int Gap
Definition
horizontalspacer.c:5
HorizontalSpacer::Border
reference int Border
Definition
horizontalspacer.c:4
RightGap
Definition
rightgap.c:3
RightGap::OnUpdate
override bool OnUpdate(Widget w)
Definition
rightgap.c:18
SpacerBase
Definition
spacerbase.c:3
SpacerBase::m_count
int m_count
Definition
spacerbase.c:5
Widget
Definition
enwidgets.c:190
Games
Dayz
scripts
3_game
gui
spacers
horizontalspacer.c
Generated by
1.17.0