Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_VersionMismatchTooltipComponent.c
Go to the documentation of this file.
1 
5 {
6  protected const string TEXT_CURRENT_VERSION = "CurrentVersionMessage";
7  protected const string TEXT_WRONG_VERSION = "WrongVersionMessage";
8 
9  protected RichTextWidget m_wWrongVersion;
10 
11  //------------------------------------------------------------------------------------------------
12  protected override void HandlerAttached(Widget w)
13  {
14  RichTextWidget currentVersion = RichTextWidget.Cast(w.FindAnyWidget(TEXT_CURRENT_VERSION));
15  if (currentVersion)
16  currentVersion.SetText(GetGame().GetBuildVersion());
17 
18  m_wWrongVersion = RichTextWidget.Cast(w.FindAnyWidget(TEXT_WRONG_VERSION));
19 
20  super.HandlerAttached(w);
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  bool SetWrongVersionMessage(string wrongVersion)
25  {
26  if (!m_wWrongVersion)
27  return false;
28 
29  m_wWrongVersion.SetText(wrongVersion);
30  return true;
31  }
32 
33  //------------------------------------------------------------------------------------------------
34  static SCR_VersionMismatchTooltipComponent FindComponent(notnull Widget w)
35  {
37  }
38 }
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_VersionMismatchTooltipComponent
Definition: SCR_VersionMismatchTooltipComponent.c:4
SCR_ScriptedWidgetComponent
Definition: SCR_ScriptedWidgetComponent.c:7