Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ListBoxElementComponent.c
Go to the documentation of this file.
1
2class SCR_ListBoxElementComponent : SCR_ModularButtonComponent
3{
4 [Attribute("Image")]
5 protected string m_sWidgetImageName;
6
7 [Attribute("Text")]
8 protected string m_sWidgetTextName;
9
10 //------------------------------------------------------------------------------------------------
11 override void HandlerAttached(Widget w)
12 {
13 super.HandlerAttached(w);
14
16 }
17
18 //------------------------------------------------------------------------------------------------
21 void SetImage(ResourceName imageOrImageset, string iconName)
22 {
23 ImageWidget w = ImageWidget.Cast(m_wRoot.FindAnyWidget(m_sWidgetImageName));
24
25 if (imageOrImageset.IsEmpty())
26 return;
27
28 if (w)
29 {
30 if (imageOrImageset.EndsWith("imageset"))
31 {
32 if (!iconName.IsEmpty())
33 w.LoadImageFromSet(0, imageOrImageset, iconName);
34 }
35 else
36 {
37 w.LoadImageTexture(0, imageOrImageset);
38 }
39 }
40 }
41
42 //------------------------------------------------------------------------------------------------
44 void SetText(string text)
45 {
46 TextWidget w = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sWidgetTextName));
47 if (w)
48 w.SetText(text);
49 }
50}
Widget m_wRoot
bool m_bToggledOnlyThroughApi
void SetImage(ResourceName imageOrImageset, string iconName)
SCR_FieldOfViewSettings Attribute