3 [
Attribute(
"#AR-Notification_Sticky_MultiplePlayerVotes",
desc:
"When there is more then 1 vote in progress", uiwidget:
UIWidgets.LocaleEditBox)]
15 [
Attribute(
"#AR-Voting_PlayerCountFormatting")]
41 array<EVotingType> validActiveVotingTypes = {};
42 array<int> votingValues = {};
48 for (
int i = count - 1; i >= 0; i--)
50 voteType = validActiveVotingTypes[i];
51 value = votingValues[i];
72 validActiveVotingTypes.RemoveOrdered(i);
73 votingValues.RemoveOrdered(i);
77 int votingCount = validActiveVotingTypes.Count();
92 else if (votingCount > 1)
124 if (!voteAuthorName.IsEmpty())
129 int currentVotes, VotesRequired;
133 m_Text.SetTextFormat(text);
178 bool showIconNametag;
180 settings.Get(
"m_bPlatformIconNametag", showIconNametag);
183 if (!showIconNametag && localPlatform !=
PlatformKind.PSN)
191 iconName =
UIConstants.PLATFROM_PLAYSTATION_ICON_NAME;
197 switch (playerPlatform)
206 iconName =
UIConstants.PLATFROM_PLAYSTATION_ICON_NAME;
227 GetGame().GetInputManager().AddActionListener(
"InstantVote",
EActionTrigger.DOWN, SCR_VoterComponent.InstantVote);
228 GetGame().GetInputManager().AddActionListener(
"InstantVoteAbstain",
EActionTrigger.DOWN, SCR_VoterComponent.InstantRemoveAndAbstainVote);
236 GetGame().GetInputManager().RemoveActionListener(
"InstantVote",
EActionTrigger.DOWN, SCR_VoterComponent.InstantVote);
237 GetGame().GetInputManager().RemoveActionListener(
"InstantVoteAbstain",
EActionTrigger.DOWN, SCR_VoterComponent.InstantRemoveAndAbstainVote);
248 GetGame().GetInputManager().ActivateContext(
"InstantVotingContext");
336 super.OnInit(notificationLog);
408 inputManager.RemoveActionListener(
"InstantVote",
EActionTrigger.DOWN, SCR_VoterComponent.InstantVote);
409 inputManager.RemoveActionListener(
"InstantVoteAbstain",
EActionTrigger.DOWN, SCR_VoterComponent.InstantRemoveAndAbstainVote);
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
void SCR_FactionManager(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_VotingManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
ScriptInvokerBase< SCR_BaseGameMode_OnPlayerDisconnected > GetOnPlayerDisconnected()
ScriptInvokerBase< SCR_BaseGameMode_PlayerId > GetOnPlayerRegistered()
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
bool m_bStickyNotificationActive
Widget m_OptionalMessageLayout
void SetStickyActive(bool newActive, bool fade=true)
static bool IsEmptyOrWhiteSpace(string input)
static const int DEFAULT_VALUE
override void OnDestroy()
string m_sVotingInstantVoteButtonsName
Widget m_InstantVoteLayout
void InstantVotingContextUpdate()
Updates each frame to keep InstantVotingContext active.
static const float PLATFORM_ICON_SIZE
string GetPlayerName(int playerId)
void OnVotingEnd(EVotingType type, int value, int winner)
EVotingType m_eActiveVotingAboutLocalPlayerVoteType
string m_sCurrentVoteCountFormatting
void VotingTimeUpdate()
Called when only 1 vote is active or when local player is the subject of the vote and timer is displa...
bool m_bIsUpdatingActionContext
TextWidget m_RemainingVotingTime
override void OnInit(SCR_NotificationsLogComponent notificationLog)
LocalizedString m_sMultipleVotesText
int m_iActiveVotingAboutLocalPlayerVoteValue
string m_sInstantVoteLayoutName
void OnPlayerJoinOrLeaveServer(int playerId)
void OnVoteCountChanged(EVotingType type, int value, int voteCount)
Widget m_VotingInstantVoteButtons
void OnVotingChanged(bool isInit=false)
EVotingType m_eActiveSingularVoteType
void EnableContextAction(bool enable)
string m_sRemainingVotingTimeName
void OnPlayerFactionChanged(Faction faction, int newCount)
void OnVoteStartOrChanged(EVotingType type, int value)
void EnableVotingTimerUI(bool enable)
SCR_VotingManagerComponent m_VotingManagerComponent
int m_eActiveSingularVoteValue
void OnSettingsMenuClosed(ChimeraMenuBase menu)
bool m_bIsDisplayingLocalVoteTimer
LocalizedString GetAuthorText()
string GetStickyNotificationText()
SCR_FieldOfViewSettings Attribute