Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TextAndWarningTooltipDetail.c
Go to the documentation of this file.
3 {
4  [Attribute()]
5  protected LocalizedString m_sWarningText;
6 
7  [Attribute(desc: "Optional")]
8  protected ResourceName m_WarningIcon;
9 
10  [Attribute("Text")]
11  protected string m_sTextWidgetName;
12 
13  [Attribute("WarningText")]
14  protected string m_sWarningTextName;
15 
16  [Attribute("WarningIcon")]
17  protected string m_sWarningImageName;
18 
19  protected TextWidget m_Text;
20  protected TextWidget m_WarningText;
21  protected ImageWidget m_WarningImage;
22 
23  //------------------------------------------------------------------------------------------------
24  override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
25  {
26  m_Text = TextWidget.Cast(widget.FindAnyWidget(m_sTextWidgetName));
27  if (!m_Text)
28  return false;
29 
30  m_WarningText = TextWidget.Cast(widget.FindAnyWidget(m_sWarningTextName));
31  if (!m_WarningText)
32  return false;
33  else
34  m_WarningText.SetText(m_sWarningText);
35 
36  m_WarningImage = ImageWidget.Cast(widget.FindAnyWidget(m_sWarningImageName));
37  if (m_WarningImage)
38  {
39  if (m_WarningIcon != string.Empty)
40  {
41  m_WarningImage.LoadImageTexture(0, m_WarningIcon);
42  m_WarningImage.SetImage(0);
43  }
44  else
45  {
46  m_WarningImage.SetVisible(false);
47  }
48  }
49 
50  return true;
51  }
52 
53  //------------------------------------------------------------------------------------------------
56  void ToggleWarning(bool showWarning)
57  {
58  if (m_WarningImage && m_WarningIcon != string.Empty)
59  m_WarningImage.SetVisible(showWarning);
60 
61  if (m_WarningText)
62  m_WarningText.SetVisible(showWarning);
63 
64  m_Text.SetVisible(!showWarning);
65  }
66 }
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_TextAndWarningTooltipDetail
Definition: SCR_TextAndWarningTooltipDetail.c:2
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition: SCR_KeyBindingMenuConfig.c:113
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EntityTooltipDetail
Definition: SCR_EntityTooltipDetail.c:2
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
LocalizedString
Definition: LocalizedString.c:21
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468