Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LabelComponent.c
Go to the documentation of this file.
2{
3 [Attribute("Label's text")]
4 protected string m_sLabel;
5
6 [Attribute("30")]
7 protected float m_fPaddingTop;
8
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"));
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 //------------------------------------------------------------------------------------------------
46
47 //------------------------------------------------------------------------------------------------
48 void SetVisible(bool visible)
49 {
50 if (!m_wLabelWidget)
51 return;
52
53 m_wLabelWidget.SetVisible(visible);
54 }
55
56 //------------------------------------------------------------------------------------------------
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};
void SetText(string text)
void SetVisible(bool visible)
static SCR_LabelComponent GetComponent(string name, Widget parent, bool searchAllChildren=true)
static SCR_LabelComponent FindLabelComponent(notnull Widget w)
void SetTopPadding(float padding)
override void HandlerAttached(Widget w)
static SCR_ScriptedWidgetComponent GetComponent(typename componentType, string name, Widget parent, bool searchAllChildren=true)
Base method for component lookup through the widget library.
SCR_FieldOfViewSettings Attribute