7 [
Attribute(
"FactionList",
desc:
"Container for available factions' buttons")]
15 [
Attribute(
"{8A77FAE1C3B1F827}UI/layouts/Menus/DeployMenu/FactionButton.layout",
desc:
"Layout for faction button, has to have SCR_FactionButton attached to it.")]
28 super.HandlerAttached(w);
40 PlayerController pc =
GetGame().GetPlayerController();
58 Widget sibling = child.GetSibling();
60 child.RemoveFromHierarchy();
68 array<Faction> availableFactions = {};
74 int playableFactionCount;
75 int factionPlayerLimit = -1;
77 for (
int i = 0; i < factionCount; ++i)
99 if (!canChangeFaction && playerFaction)
101 btnComp.SetShouldUnlock(playerFaction == scriptedFaction);
102 btnComp.SetEnabled(playerFaction == scriptedFaction);
106 if (factionPlayerLimit >= 0 && scriptedFaction.
GetPlayerCount() >= factionPlayerLimit)
108 btnComp.SetShouldUnlock(playerFaction == scriptedFaction);
109 btnComp.SetEnabled(playerFaction == scriptedFaction);
117 playableFactionCount++;
151 if (!canChangeFaction)
153 bool enabled = assignedFaction == factionBtn.
GetFaction();
155 factionBtn.SetEnabled(enabled);
156 factionBtn.SetShouldUnlock(enabled);
159 if (assignedFaction == factionBtn.
GetFaction())
160 factionBtn.HideTooltip();
170 int playableFactionCount = 0;
177 factionBtn.SetVisible(playable,
false);
179 playableFactionCount++;
260 array<Faction> factions = {};
276 if (factionBtn && factionBtn.
GetFaction() == faction)
317 super.HandlerAttached(w);
385 super.SetSelected(selected);
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
EOverrideWelcomeScreenFactionDisplay
void SCR_FactionManager(IEntitySource src, IEntity parent)
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
bool IsFactionChangeAllowed()
bool m_bUseListFromButton
ref array< SCR_DeployButtonBase > m_aButtons
void Lock(SCR_DeployButtonBase btn)
Lock this component's buttons from processing any further requests. Unlock() should be called once yo...
ref ScriptInvoker m_OnButtonFocused
EOverrideWelcomeScreenFactionDisplay ShowInWelcomeScreenOverride()
EEditableEntityLabel GetFactionLabel()
ResourceName GetFactionFlag()
ScriptInvoker_FactionPlayableChanged GetOnFactionPlayableChanged()
ScriptInvoker GetOnFactionRequested()
void OnButtonClicked(SCR_FactionButton factionBtn)
Callback when player clicks the faction button.
SCR_FactionManager m_FactionManager
void UpdateFactionButtons(Faction faction, int newCount)
Update all available faction buttons.
SCR_FactionButton GetFactionButton(int factionId)
SCR_PlayerFactionAffiliationComponent m_PlyFactionAffilComp
void RequestRandomFaction()
void OnPlayableFactionChanged(SCR_Faction faction, bool playable)
Callback when playable factions are changed.
void ShowAvailableFactions()
Display available playable factions in the list.
ref ScriptInvoker< SCR_PlayerFactionAffiliationComponent, int, bool > m_OnFactionRequested
SCR_FactionButton GetFirstValidFactionButton()
Get the first valid Faction Button from the Faction Buttons that are currently shown in the Role Sele...
ResourceName m_sFactionButton
void RequestPlayerFaction(SCR_FactionButton factionBtn)
Sends a request to assign a faction.
void OnButtonFocused(Widget w)
Callback when button is focused.
void OnFactionDialogConfirm(SCR_PersistentFactionDialog dialog)
Callback when player closes the persistent faction dialog.
void OnPlayerFactionAssigned(Faction assignedFaction)
Callback when local player's faction is assigned.
override void HandlerAttached(Widget w)
ref array< SCR_FactionButton > m_aActiveFactionButtons
static SCR_PersistentFactionDialog CreatePersistentFactionDialog(int factionIndex)
int GetRequestedFactionIndex()
static SCR_PersistentFactionDialog CreatePersistentFactionCampaignFIADialog(int factionIndex)
SCR_FieldOfViewSettings Attribute