Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ListBoxElementComponent.c
Go to the documentation of this file.
1 class 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 }
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
SCR_ListBoxElementComponent
Element of a listbox.
Definition: SCR_ListBoxElementComponent.c:2
m_bToggledOnlyThroughApi
protected bool m_bToggledOnlyThroughApi
Definition: SCR_ModularButtonComponent.c:44
Attribute
typedef Attribute
Post-process effect of scripted camera.