Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditableEntityUIRule.c
Go to the documentation of this file.
1
9{
11 [Attribute(desc: "Entity states this component visualizes.", uiwidget: UIWidgets.Flags, enums: ParamEnumArray.FromEnum(EEditableEntityState))]
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
27
29 {
31 if (!m_PrefabLinksMap.Find(type, layout))
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 }
40 {
41 return m_States;
42 }
43 int GetStatesArray(out array<EEditableEntityState> outStates)
44 {
45 return SCR_Enum.BitToIntArray(m_States, outStates);
46 }
48 {
49 return m_bInteractive;
50 }
52 {
53 return m_bIsDependent;
54 }
55
57 {
58 //--- Build prefab map
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
66 {
67 Print(string.Format("%1 for type %2 is missing GENERIC type!", Type(), Type().EnumToString(EEditableEntityType, EEditableEntityType.GENERIC)), LogLevel.ERROR);
68 }
69 }
70};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
UI layouts Menus CleanSweep CleanSweepAreaSelection layout
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
int Type
Attribute for setting any flags enum property as custom title.
Definition Attributes.c:418
bool m_bInteractive
When interactive, icons can be selected by mouse or gamepad.
EEditableEntityState GetStates()
ref map< EEditableEntityType, ResourceName > m_PrefabLinksMap
ResourceName GetLayout(EEditableEntityType type)
EEditableEntityState m_States
Entity states this component visualizes.
int GetStatesArray(out array< EEditableEntityState > outStates)
ref array< ref SCR_EntitiesEditorUIPrefab > m_PrefabLinks
Layouts assigned to each supported entity type.
Definition Types.c:486
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
EEditableEntityType
Defines type of SCR_EditableEntityComponent. Assigned automatically based on IEntity inheritance.
EEditableEntityState
SCR_FieldOfViewSettings Attribute