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_EditableEntityUIRule.c
Go to the documentation of this file.
1
7
[
BaseContainerProps
(),
SCR_BaseContainerCustomTitleFlags
(
EEditableEntityState
,
"m_States"
)]
8
class
SCR_EntitiesEditorUIRule
9
{
11
[
Attribute
(
desc
:
"Entity states this component visualizes."
, uiwidget:
UIWidgets
.Flags, enums: ParamEnumArray.FromEnum(
EEditableEntityState
))]
12
protected
EEditableEntityState
m_States
;
13
15
[
Attribute
(
desc
:
"When interactive, icons can be selected by mouse or gamepad."
)]
16
protected
bool
m_bInteractive
;
17
18
[
Attribute
(
desc
:
"When enabled, the icon will be shown only if other rules are active, it won't force visibility."
)]
19
protected
bool
m_bIsDependent
;
20
22
[
Attribute
(
desc
:
"Layouts assigned to each supported entity type."
)]
23
protected
ref array<ref SCR_EntitiesEditorUIPrefab>
m_PrefabLinks
;
24
25
protected
ref
map<EEditableEntityType, ResourceName>
m_PrefabLinksMap
=
new
map<EEditableEntityType, ResourceName>
;
26
protected
ResourceName
m_DefaultLayout
;
27
28
ResourceName
GetLayout
(
EEditableEntityType
type
)
29
{
30
ResourceName
layout
;
31
if
(!
m_PrefabLinksMap
.Find(
type
,
layout
))
32
layout
=
m_DefaultLayout
;
33
34
if
(!
layout
)
35
Print
(
string
.Format(
"No UI layout found for an entity of type '%1'!"
,
typename
.EnumToString(
EEditableEntityType
,
type
)),
LogLevel
.WARNING);
36
37
return
layout
;
38
}
39
EEditableEntityState
GetStates
()
40
{
41
return
m_States
;
42
}
43
int
GetStatesArray
(out array<EEditableEntityState> outStates)
44
{
45
return
SCR_Enum
.BitToIntArray(
m_States
, outStates);
46
}
47
bool
IsInteractive
()
48
{
49
return
m_bInteractive
;
50
}
51
bool
IsDependent
()
52
{
53
return
m_bIsDependent
;
54
}
55
56
void
SCR_EntitiesEditorUIRule
()
57
{
58
//--- Build prefab map
59
foreach
(
SCR_EntitiesEditorUIPrefab
link:
m_PrefabLinks
)
60
{
61
m_PrefabLinksMap
.Insert(link.GetType(), link.GetLayout());
62
}
63
m_PrefabLinks
= null;
//--- Erase the value afterwards, it's in m_PrefabLinksMap now
64
65
if
(!
m_PrefabLinksMap
.Find(
EEditableEntityType
.GENERIC,
m_DefaultLayout
))
66
{
67
Print
(
string
.Format(
"%1 for type %2 is missing GENERIC type!"
,
Type
(),
Type
().EnumToString(
EEditableEntityType
,
EEditableEntityType
.GENERIC)),
LogLevel
.ERROR);
68
}
69
}
70
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
type
EDamageType type
Definition
SCR_DestructibleTreeV2.c:32
layout
UI layouts Menus CleanSweep CleanSweepAreaSelection layout
Definition
SCR_GameModeCleanSweep.c:19
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
Type
int Type
Definition
ScriptCamera.c:17
ResourceName
Definition
ResourceName.c:13
SCR_BaseContainerCustomTitleFlags
Attribute for setting any flags enum property as custom title.
Definition
Attributes.c:418
SCR_EntitiesEditorUIPrefab
Definition
SCR_EntitiesEditorUIPrefab.c:3
SCR_EntitiesEditorUIRule::m_DefaultLayout
ResourceName m_DefaultLayout
Definition
SCR_EditableEntityUIRule.c:26
SCR_EntitiesEditorUIRule::m_bInteractive
bool m_bInteractive
When interactive, icons can be selected by mouse or gamepad.
Definition
SCR_EditableEntityUIRule.c:16
SCR_EntitiesEditorUIRule::IsInteractive
bool IsInteractive()
Definition
SCR_EditableEntityUIRule.c:47
SCR_EntitiesEditorUIRule::GetStates
EEditableEntityState GetStates()
Definition
SCR_EditableEntityUIRule.c:39
SCR_EntitiesEditorUIRule::m_PrefabLinksMap
ref map< EEditableEntityType, ResourceName > m_PrefabLinksMap
Definition
SCR_EditableEntityUIRule.c:25
SCR_EntitiesEditorUIRule::IsDependent
bool IsDependent()
Definition
SCR_EditableEntityUIRule.c:51
SCR_EntitiesEditorUIRule::GetLayout
ResourceName GetLayout(EEditableEntityType type)
Definition
SCR_EditableEntityUIRule.c:28
SCR_EntitiesEditorUIRule::m_States
EEditableEntityState m_States
Entity states this component visualizes.
Definition
SCR_EditableEntityUIRule.c:12
SCR_EntitiesEditorUIRule::m_bIsDependent
bool m_bIsDependent
Definition
SCR_EditableEntityUIRule.c:19
SCR_EntitiesEditorUIRule::SCR_EntitiesEditorUIRule
void SCR_EntitiesEditorUIRule()
Definition
SCR_EditableEntityUIRule.c:56
SCR_EntitiesEditorUIRule::GetStatesArray
int GetStatesArray(out array< EEditableEntityState > outStates)
Definition
SCR_EditableEntityUIRule.c:43
SCR_EntitiesEditorUIRule::m_PrefabLinks
ref array< ref SCR_EntitiesEditorUIPrefab > m_PrefabLinks
Layouts assigned to each supported entity type.
Definition
SCR_EditableEntityUIRule.c:23
SCR_Enum
Definition
SCR_Enum.c:2
UIWidgets
Definition
attributes.c:40
map
Definition
Types.c:486
Print
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
LogLevel
Enum with severity of the logging message.
Definition
LogLevel.c:14
EEditableEntityType
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
Definition
EEditableEntityType.c:6
EEditableEntityState
EEditableEntityState
Definition
EEditableEntityState.c:38
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Editor
Containers
EditableEntityUI
SCR_EditableEntityUIRule.c
Generated by
1.17.0