Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MultiTextTooltipUIComponent.c
Go to the documentation of this file.
2{
3 [Attribute(defvalue: "1 1 1 1", desc: "Color of Text.")]
4 protected ref Color m_cTextColor;
5
6 [Attribute("")]
8
9 protected Widget m_wRoot;
10
11 //------------------------------------------------------------------------------------------------
14 {
15 if (!m_wRoot)
16 return;
17
18 Widget child = m_wRoot.GetChildren();
19 Widget childtemp;
20 while (child)
21 {
22 childtemp = child;
23 child = child.GetSibling();
24 childtemp.RemoveFromHierarchy();
25 }
26 }
27
28 //------------------------------------------------------------------------------------------------
31 {
32 m_cTextColor = color;
33 }
34
35 //------------------------------------------------------------------------------------------------
43 TextWidget AddText(string text, string param1 = string.Empty, string param2 = string.Empty, string param3 = string.Empty, string param4 = string.Empty)
44 {
45 if (!m_wRoot)
46 return null;
47
48 Widget newWidget = GetGame().GetWorkspace().CreateWidgets(m_TextPrefab, m_wRoot);
49 if (!newWidget)
50 return null;
51
52 TextWidget textWidget = TextWidget.Cast(newWidget);
53 if (!textWidget)
54 return null;
55
56 textWidget.SetColor(m_cTextColor);
57 textWidget.SetTextFormat(text, param1, param2, param3, param4);
58 return textWidget;
59 }
60
61 //------------------------------------------------------------------------------------------------
62 override void HandlerAttached(Widget w)
63 {
64 m_wRoot = w;
65 }
66}
ArmaReforgerScripted GetGame()
Definition game.c:1398
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Color.c:13
TextWidget AddText(string text, string param1=string.Empty, string param2=string.Empty, string param3=string.Empty, string param4=string.Empty)
SCR_FieldOfViewSettings Attribute
T4 param4
Definition tuple.c:152
T3 param3
Definition tuple.c:93
T2 param2
Definition tuple.c:92
Tuple param1