Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LabelDescriptionTooltipDetail.c
Go to the documentation of this file.
3 {
4  [Attribute(desc: "The discription shown")]
5  protected LocalizedString m_sDescription;
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
34  foreach (EEditableEntityLabel label: m_aLabelRequired)
35  {
36  if (editableUiInfo.HasEntityLabel(label))
37  return true;
38  }
39 
40  return false;
41  }
42 }
EEditableEntityLabel
EEditableEntityLabel
Definition: EEditableEntityLabel.c:1
SCR_EditableEntityUIInfo
Definition: SCR_EditableEntityUIInfo.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition: SCR_KeyBindingMenuConfig.c:113
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_sDescription
string m_sDescription
Definition: SCR_FlashlightComponent.c:3
SCR_EntityTooltipDetail
Definition: SCR_EntityTooltipDetail.c:2
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
EEditorMode
EEditorMode
Editor mode that defines overall functionality.
Definition: EEditorMode.c:5
SCR_LabelDescriptionTooltipDetail
Definition: SCR_LabelDescriptionTooltipDetail.c:2
LocalizedString
Definition: LocalizedString.c:21
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26