Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CountingTimerUI.c
Go to the documentation of this file.
2 {
3 
4  [Attribute("", desc: "name of widget of icon attached to the timer")]
5  protected string m_sIconName;
6 
7  protected ImageWidget m_wImageWidget;
8 
9  //------------------------------------------------------------------------------------------------
10  protected void UpdateIngameIcon()
11  {
12  if (!m_wImageWidget)
13  return;
14 
15  if (AnimateWidget.IsAnimating(m_wImageWidget))
16  return;
17 
18  if (m_wImageWidget.GetOpacity() == 1)
19  AnimateWidget.Opacity(m_wImageWidget, 0, 1);
20  else
21  AnimateWidget.Opacity(m_wImageWidget, 1, 1);
22  }
23 
24  //------------------------------------------------------------------------------------------------
25  override void HandlerAttached(Widget w)
26  {
27  m_wRoot = w;
28  m_wImageWidget = ImageWidget.Cast(w.FindAnyWidget(m_sIconName));
29 
30  if (!m_wImageWidget)
31  return;
32 
33  // Update the icon at 30 fps. It needs to update when the animation has finished to make re-animating seamless
34  GetGame().GetCallqueue().CallLater(UpdateIngameIcon, 30, true);
35  }
36 }
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_CountingTimerUI
Definition: SCR_CountingTimerUI.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_ScriptedWidgetComponent
Definition: SCR_ScriptedWidgetComponent.c:7