8 TextWidget text = TextWidget.Cast(widget.FindAnyWidget(
"Text"));
12 BaseGameMode gameMode =
GetGame().GetGameMode();
17 if (!editorManager || editorManager.GetCurrentMode() !=
EEditorMode.BUILDING)
21 SCR_CampaignBuildingManagerComponent buildingManager = SCR_CampaignBuildingManagerComponent.Cast(gameMode.FindComponent(SCR_CampaignBuildingManagerComponent));
29 array<ref SCR_EntityBudgetValue> budgets = {};
30 if (!editableUiInfo.GetEntityBudgetCost(budgets) || budgets.IsEmpty())
33 int conflictBudget = 0;
38 conflictBudget += budget.GetBudgetValue();
41 if (conflictBudget <= 0)
45 text.SetText(Math.Round(conflictBudget * (buildingManager.GetCompositionRefundPercentage() * 0.01)).ToString());