Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_LabelDescriptionTooltipDetail.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "The discription shown")]
6
7 [Attribute("0", desc: "One of the given labels should be on the Entity in order to dsiplay the tooltip", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EEditableEntityLabel))]
8 protected ref array<EEditableEntityLabel> m_aLabelRequired;
9
10 [Attribute("0", desc: "In which modes should the tooltip be shown", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EEditorMode))]
11 protected ref array<EEditorMode> m_aShownInEditorModes;
12
13 //------------------------------------------------------------------------------------------------
14 override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
15 {
16 if (m_sDescription.IsEmpty() || m_aShownInEditorModes.IsEmpty() || m_aLabelRequired.IsEmpty())
17 return false;
18
19 SCR_EditorManagerEntity editorManager = SCR_EditorManagerEntity.GetInstance();
20 if (!editorManager || !m_aShownInEditorModes.Contains(editorManager.GetCurrentMode()))
21 return false;
22
23 SCR_EditableEntityUIInfo editableUiInfo = SCR_EditableEntityUIInfo.Cast(entity.GetInfo());
24 if (!editableUiInfo)
25 return false;
26
27 TextWidget text = TextWidget.Cast(widget);
28 if (!text)
29 return false;
30
31 text.SetText(m_sDescription);
32
33 //~ Check if entity has one of the labels
35 {
36 if (editableUiInfo.HasEntityLabel(label))
37 return true;
38 }
39
40 return false;
41 }
42}
EEditableEntityLabel
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
SCR_UIInfo GetInfo(IEntity owner=null)
bool HasEntityLabel(EEditableEntityLabel label)
ref array< EEditableEntityLabel > m_aLabelRequired
override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
SCR_FieldOfViewSettings Attribute
EEditorMode
Editor mode that defines overall functionality.
Definition EEditorMode.c:6