Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SupplyCapacityTooltipDetail.c
Go to the documentation of this file.
3 {
4  [Attribute("#AR-ValueUnit_Short_Plus", desc: "Formatting of adding supplies. %1 being amount")]
5  protected LocalizedString m_SupplyFormattingPositive;
6 
7  [Attribute("#AR-ValueUnit_Short_Minus", desc: "Formatting of removing supplies. %1 being amount")]
8  protected LocalizedString m_SupplyFormattingNegative;
9 
10  //------------------------------------------------------------------------------------------------
11  override bool InitDetail(SCR_EditableEntityComponent entity, Widget widget)
12  {
13  TextWidget text = TextWidget.Cast(widget);
14  if (!text)
15  return false;
16 
17  SCR_EditableEntityUIInfo editableUiInfo = SCR_EditableEntityUIInfo.Cast(entity.GetInfo());
18  if (!editableUiInfo)
19  return false;
20 
21  if (!editableUiInfo.HasEntityLabel(EEditableEntityLabel.SERVICE_SUPPLY_STORAGE))
22  return false;
23 
24  if (SCR_CampaignMilitaryBaseComponent.SUPPLY_DEPOT_CAPACITY >= 0)
25  text.SetTextFormat(m_SupplyFormattingPositive, SCR_CampaignMilitaryBaseComponent.SUPPLY_DEPOT_CAPACITY.ToString());
26  else
27  text.SetTextFormat(m_SupplyFormattingNegative, SCR_CampaignMilitaryBaseComponent.SUPPLY_DEPOT_CAPACITY.ToString());
28 
29  return true;
30  }
31 }
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
SCR_SupplyCapacityTooltipDetail
Definition: SCR_SupplyCapacityTooltipDetail.c:2
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EntityTooltipDetail
Definition: SCR_EntityTooltipDetail.c:2
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
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_CampaignMilitaryBaseComponent
Definition: SCR_CampaignMilitaryBaseComponent.c:38