Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_LabelComponent.c
Go to the documentation of this file.
1
class
SCR_LabelComponent
:
SCR_ScriptedWidgetComponent
2
{
3
[
Attribute
(
"Label's text"
)]
4
protected
string
m_sLabel
;
5
6
[
Attribute
(
"30"
)]
7
protected
float
m_fPaddingTop
;
8
9
protected
TextWidget
m_wLabelWidget
;
10
11
//------------------------------------------------------------------------------------------------
12
override
void
HandlerAttached
(
Widget
w)
13
{
14
super.HandlerAttached(w);
15
16
if
(!w)
17
return
;
18
19
m_wLabelWidget
=
TextWidget
.Cast(w.FindAnyWidget(
"Label"
));
20
ResetTopPadding
();
21
SetText
(
m_sLabel
);
22
}
23
24
//------------------------------------------------------------------------------------------------
25
void
SetText
(
string
text)
26
{
27
m_wLabelWidget
.SetText(text);
28
}
29
30
//------------------------------------------------------------------------------------------------
31
void
SetTopPadding
(
float
padding)
32
{
33
if
(!
m_wLabelWidget
)
34
return
;
35
36
float
left, top, right, bottom;
37
AlignableSlot
.GetPadding(
m_wLabelWidget
, left, top, right, bottom);
38
AlignableSlot
.SetPadding(
m_wLabelWidget
, left, padding, right, bottom);
39
}
40
41
//------------------------------------------------------------------------------------------------
42
void
ResetTopPadding
()
43
{
44
SetTopPadding
(
m_fPaddingTop
);
45
}
46
47
//------------------------------------------------------------------------------------------------
48
void
SetVisible
(
bool
visible)
49
{
50
if
(!
m_wLabelWidget
)
51
return
;
52
53
m_wLabelWidget
.SetVisible(visible);
54
}
55
56
//------------------------------------------------------------------------------------------------
57
static
SCR_LabelComponent
FindLabelComponent
(notnull
Widget
w)
58
{
59
return
SCR_LabelComponent
.Cast(w.FindHandler(
SCR_LabelComponent
));
60
}
61
62
//------------------------------------------------------------------------------------------------
65
static
SCR_LabelComponent
GetComponent
(
string
name,
Widget
parent,
bool
searchAllChildren =
true
)
66
{
67
return
SCR_LabelComponent
.Cast(
SCR_ScriptedWidgetComponent
.
GetComponent
(
SCR_LabelComponent
, name, parent, searchAllChildren));
68
}
69
};
AlignableSlot
Definition
AlignableSlot.c:13
SCR_LabelComponent
Definition
SCR_LabelComponent.c:2
SCR_LabelComponent::m_wLabelWidget
TextWidget m_wLabelWidget
Definition
SCR_LabelComponent.c:9
SCR_LabelComponent::SetText
void SetText(string text)
Definition
SCR_LabelComponent.c:25
SCR_LabelComponent::m_fPaddingTop
float m_fPaddingTop
Definition
SCR_LabelComponent.c:7
SCR_LabelComponent::SetVisible
void SetVisible(bool visible)
Definition
SCR_LabelComponent.c:48
SCR_LabelComponent::GetComponent
static SCR_LabelComponent GetComponent(string name, Widget parent, bool searchAllChildren=true)
Definition
SCR_LabelComponent.c:65
SCR_LabelComponent::ResetTopPadding
void ResetTopPadding()
Definition
SCR_LabelComponent.c:42
SCR_LabelComponent::FindLabelComponent
static SCR_LabelComponent FindLabelComponent(notnull Widget w)
Definition
SCR_LabelComponent.c:57
SCR_LabelComponent::m_sLabel
string m_sLabel
Definition
SCR_LabelComponent.c:4
SCR_LabelComponent::SetTopPadding
void SetTopPadding(float padding)
Definition
SCR_LabelComponent.c:31
SCR_LabelComponent::HandlerAttached
override void HandlerAttached(Widget w)
Definition
SCR_LabelComponent.c:12
SCR_ScriptedWidgetComponent
Definition
SCR_ScriptedWidgetComponent.c:8
SCR_ScriptedWidgetComponent::GetComponent
static SCR_ScriptedWidgetComponent GetComponent(typename componentType, string name, Widget parent, bool searchAllChildren=true)
Base method for component lookup through the widget library.
Definition
SCR_ScriptedWidgetComponent.c:29
TextWidget
Definition
TextWidget.c:16
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
Components
WidgetLibrary
SCR_LabelComponent.c
Generated by
1.17.0