Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GameOverScreenContentUIComponent.c
Go to the documentation of this file.
1 class SCR_GameOverScreenContentUIComponent: ScriptedWidgetComponent
2 {
3  [Attribute("GameOver_Image")]
4  protected string m_sImageName;
5 
6  [Attribute("Image_SizeSetter")]
7  protected string m_sImageHolderName;
8 
9  [Attribute("GameOver_State")]
10  protected string m_sTileName;
11 
12  [Attribute("GameOver_Condition")]
13  protected string m_sSubtitleName;
14 
15  [Attribute("GameOver_Description")]
16  protected string m_sDebriefingName;
17 
18  protected Widget m_wRoot;
19 
24  void InitContent(SCR_GameOverScreenUIContentData endScreenUIContent)
25  {
26  TextWidget titleWidget = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sTileName));
27  TextWidget subtitleWidget = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sSubtitleName));
28  TextWidget debriefingWidget = TextWidget.Cast(m_wRoot.FindAnyWidget(m_sDebriefingName));
29  ImageWidget image = ImageWidget.Cast(m_wRoot.FindAnyWidget(m_sImageName));
30 
31  if (titleWidget)
32  titleWidget.SetTextFormat(endScreenUIContent.m_sTitle, endScreenUIContent.m_sTitleParam);
33 
34  if (subtitleWidget)
35  subtitleWidget.SetTextFormat(endScreenUIContent.m_sSubtitle, endScreenUIContent.m_sSubtitleParam);
36 
37  if (debriefingWidget)
38  debriefingWidget.SetTextFormat(endScreenUIContent.m_sDebriefing, endScreenUIContent.m_sDebriefingParam);
39 
40 
41  if (image && !endScreenUIContent.m_sImageTexture.IsEmpty())
42  {
43  image.LoadImageTexture(0, endScreenUIContent.m_sImageTexture);
44  }
45  //~ Hide image if non set
46  else
47  {
48  Widget imageHolder = m_wRoot.FindAnyWidget(m_sImageHolderName);
49  if (imageHolder)
50  imageHolder.SetVisible(false);
51  }
52  }
53 
54  override void HandlerAttached(Widget w)
55  {
56  m_wRoot = w;
57  }
58  override void HandlerDeattached(Widget w)
59  {
60  }
61 };
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_GameOverScreenUIContentData
Definition: SCR_GameOverScreenManagerComponent.c:497
SCR_GameOverScreenContentUIComponent
Definition: SCR_GameOverScreenContentUIComponent.c:1