Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TimePresetsAttributeUIComponent.c
Go to the documentation of this file.
2 {
3  protected bool m_bIsReseting = false;
4 
5  override void SetFromVar(SCR_BaseEditorAttributeVar var)
6  {
7  if (!var)
8  return;
9 
10  if (!m_bButtonValueInitCalled)
11  super.SetFromVar(var);
12  else //Time slider sets is changed thus setting the button disabled. This will set it enabled again on reset.
13  GetGame().GetCallqueue().CallLater(DelayedReset, 1, false, var);
14  }
15 
16  protected void DelayedReset(SCR_BaseEditorAttributeVar var)
17  {
18  m_bIsReseting = true;
19  m_ToolBoxComponent.SetItemSelected(var.GetInt(), true);
20  m_bIsReseting = false;
21  }
22 
23  override bool OnChange(Widget w, int x, int y, bool finished)
24  {
25  if (m_bIsReseting)
26  return false;
27  else
28  return super.OnChange(w, x, y, finished);
29  }
30 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_ButtonBoxAttributeUIComponent
Definition: SCR_ButtonBoxAttributeUIComponent.c:3
SCR_TimePresetsAttributeUIComponent
Definition: SCR_TimePresetsAttributeUIComponent.c:1