Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_CheckboxComponent.c
Go to the documentation of this file.
1
2
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
};
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition
SCR_DestructionSynchronizationComponent.c:17
SCR_ButtonBaseComponent
Base class for any button, regardless its own content.
Definition
SCR_ButtonBaseComponent.c:7
SCR_ChangeableComponentBase::m_OnChanged
ref ScriptInvoker m_OnChanged
Definition
SCR_ChangeableComponentBase.c:34
SCR_CheckboxComponent
This is refactored checkbox preserving its own class and API for compatability purposes.
Definition
SCR_CheckboxComponent.c:4
SCR_SelectionWidgetComponent::m_iSelectedItem
int m_iSelectedItem
Definition
SCR_SelectionWidgetComponent.c:9
SCR_ToolboxComponent
Definition
SCR_ToolboxComponent.c:3
SCR_ToolboxComponent::m_aSelectionElements
ref array< SCR_ButtonBaseComponent > m_aSelectionElements
Definition
SCR_ToolboxComponent.c:18
SCR_ToolboxComponent::SetCurrentItem
override bool SetCurrentItem(int i, bool playSound=false, bool animate=false)
Definition
SCR_ToolboxComponent.c:191
SCR_WLibComponentBase
Base class for all final Reforger interactive elements.
Definition
SCR_WLibComponentBase.c:9
Widget
Definition
Widget.c:13
scripts
Game
UI
Components
WidgetLibrary
SCR_CheckBox
SCR_CheckboxComponent.c
Generated by
1.17.0