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_EditorStateConditionUIComponent.c
Go to the documentation of this file.
1
class
SCR_EditorStateConditionUIComponent
:
SCR_BaseEditorUIComponent
2
{
3
[
Attribute
(
desc
:
"Show the widget only when this editor state is active."
, uiwidget:
UIWidgets
.ComboBox, enums: ParamEnumArray.FromEnum(
EEditorState
))]
4
protected
EEditorState
m_State
;
5
6
[
Attribute
(
desc
:
"When enabled, given editor state must *not* be active."
)]
7
protected
bool
m_bInverted
;
8
9
//------------------------------------------------------------------------------------------------
10
protected
void
OnStateChanged
(
EEditorState
state,
EEditorState
statePrev)
11
{
12
bool
show = state ==
m_State
;
13
if
(
m_bInverted
)
14
show = !show;
15
16
GetWidget
().SetVisible(show);
17
}
18
19
//------------------------------------------------------------------------------------------------
20
override
bool
IsUnique
()
21
{
22
return
false
;
23
}
24
25
//------------------------------------------------------------------------------------------------
26
override
void
HandlerAttachedScripted
(
Widget
w)
27
{
28
SCR_StatesEditorComponent
stateManager =
SCR_StatesEditorComponent
.Cast(
SCR_StatesEditorComponent
.GetInstance(
SCR_StatesEditorComponent
,
true
));
29
if
(!stateManager)
30
return
;
31
32
stateManager.
GetOnStateChange
().Insert(
OnStateChanged
);
33
OnStateChanged
(stateManager.
GetState
(), -1);
34
}
35
36
//------------------------------------------------------------------------------------------------
37
override
void
HandlerDeattached
(
Widget
w)
38
{
39
SCR_StatesEditorComponent
stateManager =
SCR_StatesEditorComponent
.Cast(
SCR_StatesEditorComponent
.GetInstance(
SCR_StatesEditorComponent
));
40
if
(!stateManager)
41
return
;
42
43
stateManager.
GetOnStateChange
().Remove(
OnStateChanged
);
44
}
45
}
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
GetWidget
Widget GetWidget()
Definition
SCR_VonDisplay.c:162
SCR_BaseEditorUIComponent
Definition
SCR_BaseEditorUIComponent.c:4
SCR_EditorStateConditionUIComponent
Definition
SCR_EditorStateConditionUIComponent.c:2
SCR_EditorStateConditionUIComponent::OnStateChanged
void OnStateChanged(EEditorState state, EEditorState statePrev)
Definition
SCR_EditorStateConditionUIComponent.c:10
SCR_EditorStateConditionUIComponent::HandlerDeattached
override void HandlerDeattached(Widget w)
Definition
SCR_EditorStateConditionUIComponent.c:37
SCR_EditorStateConditionUIComponent::m_State
EEditorState m_State
Definition
SCR_EditorStateConditionUIComponent.c:4
SCR_EditorStateConditionUIComponent::IsUnique
override bool IsUnique()
Definition
SCR_EditorStateConditionUIComponent.c:20
SCR_EditorStateConditionUIComponent::m_bInverted
bool m_bInverted
Definition
SCR_EditorStateConditionUIComponent.c:7
SCR_EditorStateConditionUIComponent::HandlerAttachedScripted
override void HandlerAttachedScripted(Widget w)
Definition
SCR_EditorStateConditionUIComponent.c:26
SCR_StatesEditorComponent
Definition
SCR_StatesEditorComponent.c:10
SCR_StatesEditorComponent::GetState
EEditorState GetState()
Definition
SCR_StatesEditorComponent.c:33
SCR_StatesEditorComponent::GetOnStateChange
ScriptInvoker GetOnStateChange()
Definition
SCR_StatesEditorComponent.c:135
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
EEditorState
EEditorState
Unique editor state.
Definition
EEditorState.c:6
scripts
Game
Editor
UI
Components
Common
SCR_EditorStateConditionUIComponent.c
Generated by
1.17.0