Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_BaseTooltipEditorUIComponent.c
Go to the documentation of this file.
1 
4 {
5  [Attribute()]
6  protected string m_sNameWidgetName;
7 
8  [Attribute()]
9  protected string m_sDescriptionWidgetName;
10 
11  [Attribute()]
12  protected string m_sIconWidgetName;
13 
14  //------------------------------------------------------------------------------------------------
17  void UpdateTooltip(Managed instance = null);
18 
19  //------------------------------------------------------------------------------------------------
23  bool SetTooltip(SCR_UIInfo info, Managed instance = null)
24  {
25  if (!info) return false;
26 
27  Widget widget = GetWidget();
28  TextWidget nameWidget = TextWidget.Cast(widget.FindAnyWidget(m_sNameWidgetName));
29  TextWidget descriptionWidget = TextWidget.Cast(widget.FindAnyWidget(m_sDescriptionWidgetName));
30 
31 // if (info.HasName() && !info.HasDescription())
32 // {
33 // //--- Only name is defined, use it as a desciption
34 // if (nameWidget)
35 // {
36 // nameWidget.SetVisible(false);
37 // }
38 // if (descriptionWidget)
39 // {
40 // info.SetNameTo(descriptionWidget);
41 // }
42 // }
43 // else
44 // {
45  //--- Name and possibly description defined
46  if (nameWidget)
47  {
48  info.SetNameTo(nameWidget);
49  nameWidget.SetVisible(info.HasName());
50  }
51 
52  if (descriptionWidget)
53  {
54  info.SetDescriptionTo(descriptionWidget);
55  descriptionWidget.SetVisible(info.HasDescription());
56  }
57 // }
58 
59  ImageWidget imageWidget = ImageWidget.Cast(widget.FindAnyWidget(m_sIconWidgetName));
60  if (imageWidget && !info.SetIconTo(imageWidget))
61  imageWidget.SetVisible(false);
62 
63  return true;
64  }
65 
66  //------------------------------------------------------------------------------------------------
67  override bool IsUnique()
68  {
69  return false;
70  }
71 }
SCR_BaseTooltipEditorUIComponent
Definition: SCR_BaseTooltipEditorUIComponent.c:3
m_sIconWidgetName
protected string m_sIconWidgetName
Definition: SCR_GroupEditableEntityUIComponent.c:6
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_UIInfo
Definition: SCR_UIInfo.c:7
SCR_BaseEditorUIComponent
Definition: SCR_BaseEditorUIComponent.c:3
GetWidget
protected Widget GetWidget()
Definition: SCR_VonDisplay.c:155