Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ButtonCheckerComponent.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
3 {
4  // Checker
5  const string WIDGET_CHECKER = "Checker";
6  protected SCR_ModularButtonComponent m_Checker;
7 
8  //------------------------------------------------------------------------------------------------
9  override void HandlerAttached(Widget w)
10  {
11  super.HandlerAttached(w);
12 
13  // Find checker
14  Widget checkerWidget = w.FindAnyWidget(WIDGET_CHECKER);
15  if (checkerWidget)
16  m_Checker = SCR_ModularButtonComponent.Cast(checkerWidget.FindHandler(SCR_ModularButtonComponent));
17  }
18 
19  //------------------------------------------------------------------------------------------------
20  override void SetToggled(bool toggled, bool animate = true, bool invokeChange = true)
21  {
22  super.SetToggled(toggled, animate, invokeChange);
23 
24  // Switch checker
25  if (m_Checker)
26  m_Checker.SetToggled(toggled);
27  }
28 
29  override bool OnClick(Widget w, int x, int y, int button)
30  {
31  super.OnClick(w, x, y, button);
32 
33  return true;
34  }
35 };
SCR_ButtonTextComponent
Definition: SCR_ButtonTextComponent.c:2
SCR_ButtonCheckerComponent
Definition: SCR_ButtonCheckerComponent.c:2