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_AttributesButtonEditorUIComponent.c
Go to the documentation of this file.
1
class
SCR_AttributesButtonEditorUIComponent
:
SCR_BaseEditorUIComponent
2
{
3
//---- REFACTOR NOTE START: Enum could be used for better clarity
4
5
[
Attribute
(
"0"
, uiwidget:
UIWidgets
.ComboBox,
"Attribute target type."
, enums: { ParamEnum(
"Global"
,
"0"
), ParamEnum(
"Camera"
,
"1"
), ParamEnum(
"FactionsOnly"
,
"2"
) })]
6
protected
int
m_iTarget
;
7
8
//---- REFACTOR NOTE END ----
9
10
[
Attribute
(
desc
:
"Config of the category that should be selected upon opening attribute window."
,
params
:
"conf class=SCR_EditorAttributeCategory"
)]
11
protected
ResourceName
m_Category
;
12
13
protected
void
OnButtonAction
()
14
{
15
SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
16
if
(!attributesManager)
17
return
;
18
19
if
(
m_Category
)
20
attributesManager.SetCurrentCategory(
m_Category
);
21
22
//---- REFACTOR NOTE START: Enum could be used for better clarity
23
24
switch
(
m_iTarget
)
25
{
26
case
0:
27
attributesManager.StartEditing(
GetGame
().
GetGameMode
());
28
break
;
29
case
1:
30
attributesManager.StartEditing(
SCR_CameraEditorComponent
.
GetCameraInstance
());
31
break
;
32
case
2:
33
attributesManager.StartEditing(
SCR_TaskSystem
.GetInstance());
34
break
;
35
}
36
37
//---- REFACTOR NOTE END ----
38
}
39
40
override
bool
IsUnique
()
41
{
42
return
false
;
43
}
44
45
override
void
HandlerAttachedScripted
(
Widget
w)
46
{
47
SCR_InputButtonComponent
navButton =
SCR_InputButtonComponent
.Cast(w.FindHandler(
SCR_InputButtonComponent
));
48
if
(navButton)
49
navButton.
m_OnActivated
.Insert(
OnButtonAction
);
50
else
51
ButtonActionComponent
.GetOnAction(w,
true
).Insert(
OnButtonAction
);
52
}
53
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
ButtonActionComponent
Component to execute action when the button or its shortcut is pressed.
Definition
ButtonActionComponent.c:3
ResourceName
Definition
ResourceName.c:13
SCR_AttributesButtonEditorUIComponent
Definition
SCR_AttributesButtonEditorUIComponent.c:2
SCR_AttributesButtonEditorUIComponent::OnButtonAction
void OnButtonAction()
Definition
SCR_AttributesButtonEditorUIComponent.c:13
SCR_AttributesButtonEditorUIComponent::IsUnique
override bool IsUnique()
Definition
SCR_AttributesButtonEditorUIComponent.c:40
SCR_AttributesButtonEditorUIComponent::HandlerAttachedScripted
override void HandlerAttachedScripted(Widget w)
Definition
SCR_AttributesButtonEditorUIComponent.c:45
SCR_AttributesButtonEditorUIComponent::m_iTarget
int m_iTarget
Definition
SCR_AttributesButtonEditorUIComponent.c:6
SCR_AttributesButtonEditorUIComponent::m_Category
ResourceName m_Category
Definition
SCR_AttributesButtonEditorUIComponent.c:11
SCR_BaseEditorUIComponent
Definition
SCR_BaseEditorUIComponent.c:4
SCR_CameraEditorComponent
Definition
SCR_CameraEditorComponent.c:14
SCR_CameraEditorComponent::GetCameraInstance
static SCR_ManualCamera GetCameraInstance()
Definition
SCR_CameraEditorComponent.c:65
SCR_InputButtonComponent
Definition
SCR_InputButtonComponent.c:2
SCR_InputButtonComponent::m_OnActivated
ref ScriptInvoker m_OnActivated
Definition
SCR_InputButtonComponent.c:153
SCR_TaskSystem
Definition
SCR_TaskSystem.c:6
UIWidgets
Definition
attributes.c:40
Widget
Definition
Widget.c:13
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
UI
Components
Common
SCR_AttributesButtonEditorUIComponent.c
Generated by
1.17.0