Arma Reforger Explorer
1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CheckboxComponent.c
Go to the documentation of this file.
1
3
class
SCR_CheckboxComponent
:
SCR_ToolboxComponent
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_CheckboxComponent
This is refactored checkbox preserving its own class and API for compatability purposes.
Definition:
SCR_CheckboxComponent.c:3
SCR_WLibComponentBase
Base class for all final Reforger interactive elements.
Definition:
SCR_WLibComponentBase.c:4
m_OnChanged
protected ref ScriptInvokerTabViewIndex m_OnChanged
Definition:
SCR_TabViewComponent.c:64
SCR_ButtonBaseComponent
Base class for any button, regardless its own content.
Definition:
SCR_ButtonBaseComponent.c:3
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition:
SCR_DestructionSynchronizationComponent.c:17
SCR_ToolboxComponent
Definition:
SCR_ToolboxComponent.c:2
scripts_Arma_Reforger_v1.1.0.42
scripts
Game
UI
Components
WidgetLibrary
SCR_CheckBox
SCR_CheckboxComponent.c
Generated by
1.8.17