Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CheckboxComponent.c
Go to the documentation of this file.
1
2
4{
5 //------------------------------------------------------------------------------------------------
6 bool IsChecked()
7 {
8 return m_iSelectedItem;
9 }
10
11 //------------------------------------------------------------------------------------------------
12 void SetChecked(bool value, bool animate = true, bool playSound = true)
13 {
14 int index = value;
15 SetCurrentItem(index, animate, playSound);
16 }
17
18 //------------------------------------------------------------------------------------------------
19 override void OnElementChanged(SCR_ButtonBaseComponent comp, bool state)
20 {
21 if (!state)
22 return;
23
24 bool selected = m_aSelectionElements.Find(comp);
25 m_OnChanged.Invoke(this, selected);
26 }
27
28 static SCR_CheckboxComponent GetCheckboxComponent(string name, Widget parent, bool searchAllChildren = true)
29 {
30 auto comp = SCR_CheckboxComponent.Cast(
31 SCR_WLibComponentBase.GetComponent(SCR_CheckboxComponent, name, parent, searchAllChildren)
32 );
33 return comp;
34 }
35};
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Base class for any button, regardless its own content.
This is refactored checkbox preserving its own class and API for compatability purposes.
ref array< SCR_ButtonBaseComponent > m_aSelectionElements
override bool SetCurrentItem(int i, bool playSound=false, bool animate=false)
Base class for all final Reforger interactive elements.