Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignBuildingOpenedLabelHintCondition.c
Go to the documentation of this file.
1 [BaseContainerProps(), SCR_BaseContainerHintCondition()]
3 {
4  [Attribute(defvalue: "1", uiwidget: UIWidgets.ComboBox, desc: "A label provider has to have to show a hint.", enums: ParamEnumArray.FromEnum(EEditableEntityLabel))]
5  protected EEditableEntityLabel m_eLabel;
6 
7  //------------------------------------------------------------------------------------------------
8  override protected void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
9  {
10  if (!HasLabelSet())
11  return;
12 
13  editorManager.GetOnOpened().Insert(Activate);
14  editorManager.GetOnClosed().Insert(Deactivate);
15  }
16 
17  //------------------------------------------------------------------------------------------------
18  override protected void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
19  {
20  if (!HasLabelSet())
21  return;
22 
23  editorManager.GetOnOpened().Remove(Activate);
24  editorManager.GetOnClosed().Remove(Deactivate);
25  }
26 
27  //------------------------------------------------------------------------------------------------
30  bool HasLabelSet()
31  {
32  SCR_CampaignBuildingEditorComponent CampaignBuildingEditorComponent = SCR_CampaignBuildingEditorComponent.Cast(SCR_CampaignBuildingEditorComponent.GetInstance(SCR_CampaignBuildingEditorComponent));
33  if (!CampaignBuildingEditorComponent)
34  return false;
35 
36  SCR_CampaignBuildingProviderComponent providerComponent = CampaignBuildingEditorComponent.GetProviderComponent();
37  if (!providerComponent)
38  return false;
39 
40  array<EEditableEntityLabel> providerTraits = providerComponent.GetAvailableTraits();
41  return providerTraits.Contains(m_eLabel);
42  }
43 }
m_eLabel
SCR_EditableEntityCampaignBuildingLabelSetting m_eLabel
SCR_BaseEditorHintCondition
Definition: SCR_BaseEditorHintCondition.c:2
EEditableEntityLabel
EEditableEntityLabel
Definition: EEditableEntityLabel.c:1
SCR_CampaignBuildingOpenedLabelHintCondition
Definition: SCR_CampaignBuildingOpenedLabelHintCondition.c:2
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
Attribute
typedef Attribute
Post-process effect of scripted camera.
Deactivate
protected void Deactivate()
Definition: SCR_BaseHintCondition.c:27
Activate
protected void Activate()
Definition: SCR_BaseHintCondition.c:9
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