15 return super.OnClick(w, x, y, button);
24 return super.OnFocus(w, x, y);
33 return super.OnFocusLost(w, x, y);
101 comboImage.SetOpacity(opacity);
159 protected const string LOCK_GROUP =
"#AR-Player_Groups_Lock";
163 protected const string JOIN_GROUP =
"#AR-DeployMenu_JoinGroup";
182 super.HandlerAttached(w);
184 m_ScrollComponent = SCR_HorizontalScrollAnimationComponent.Cast(w.FindAnyWidget(
"CallsignFrame").FindHandler(SCR_HorizontalScrollAnimationComponent));
190 super.HandlerDeattached(w);
199 super.OnClick(w, x, y, button);
218 m_GroupComponent = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
223 if (!playerController)
226 SocialComponent socialComp = SocialComponent.Cast(playerController.FindComponent(SocialComponent));
258 if (squadType && squadFrameType)
261 squadFrameType.SetVisible(!roleName.IsEmpty());
262 squadType.SetText(roleName);
267 frequency.SetTextFormat(
"%1 #AR-VON_FrequencyUnits_MHz", group.
GetRadioFrequency() * 0.001);
283 playerCount.SetColor(
UIColors.WARNING);
284 playerImageWidget.SetColor(
UIColors.WARNING);
288 playerCount.SetColor(
Color.White);
289 playerImageWidget.SetColor(
Color.White);
307 if (m_wPrivateIconImage)
313 privateIcon.SetVisible(group.
IsPrivate());
338 array<ResourceName> textures = {};
342 array<string> names = {};
346 else if (!textures.IsEmpty())
347 groupIcon.SetImage(textures[0]);
350 array<ResourceName> images = {};
355 array<string> names = {};
357 if (!names.IsEmpty())
360 else if (!images.IsEmpty())
361 groupIcon.SetImage(images[0]);
371 groupIcon.SetImage(flag);
390 imageButton.SetVisible(
true);
395 imageButton.SetEnabled(
false);
405 array<ResourceName> textures = {};
411 array<string> names = {};
417 else if (!textures.IsEmpty())
419 imageButton.SetImage(textures[0]);
423 array<ResourceName> images = {};
429 array<string> names = {};
433 if (!names.IsEmpty())
436 else if (!images.IsEmpty())
438 imageButton.SetImage(images[0]);
451 imageButton.SetImage(flag);
458 SCR_PlayerControllerGroupComponent playerComponent = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
459 if (!playerComponent)
468 SCR_NotificationsComponent.SendLocal(
ENotification.GROUPS_PLAYER_IS_NOT_LEADER);
474 array<string> flagNames = {};
475 array<ResourceName> flagTextures = {};
479 if (!flagNames.IsEmpty() || !flagTextures.IsEmpty())
482 SCR_NotificationsComponent.SendLocal(
ENotification.GROUPS_NO_FLAGS);
510 taskOverlay.SetVisible(
false);
515 if (!groupTaskExecutor)
517 taskOverlay.SetVisible(
false);
524 taskOverlay.SetVisible(
false);
531 taskOverlay.SetVisible(
false);
537 taskNameWidget.SetTextFormat(groupTask.GetTaskUIInfo().GetTranslatedName());
543 if (taskIconSymbolWidget)
546 taskIconSymbolWidget.LoadImageFromSet(0, groupTask.GetTaskIconPath(), groupTask.GetTaskIconSetName());
550 if (taskIconOutlineWidget)
554 if (taskIconBackgroundWidget)
555 taskIconBackgroundWidget.SetColor(groupFaction.GetFactionColor());
558 taskOverlay.SetVisible(
true);
565 if (!groupTaskExecutor)
586 if (!playerController)
627 if (!groupDetailType)
630 SCR_PlayerControllerGroupComponent s_PlayerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
631 if (!s_PlayerGroupController)
634 SocialComponent socialComp = SocialComponent.Cast(playerController.FindComponent(SocialComponent));
638 if (!s_PlayerGroupController.CanPlayerJoinGroup(playerController.GetPlayerId(),
m_GroupManager.FindGroup(
m_iGroupID)))
647 if (groupTypeOverlay)
650 groupTypeOverlay.SetVisible(!roleName.IsEmpty());
651 groupDetailType.SetText(roleName);
657 description.SetText(
string.Empty);
661 frequency.SetTextFormat(
"%1 #AR-VON_FrequencyUnits_MHz", group.
GetRadioFrequency() * 0.001);
663 Widget children = playerList.GetChildren();
666 playerList.RemoveChild(children);
667 children = playerList.GetChildren();
670 children = leaderList.GetChildren();
673 leaderList.RemoveChild(children);
674 children = leaderList.GetChildren();
687 foreach (
int playerID : playerIDs)
689 if (playerID == leaderID)
707 SCR_PlayerControllerGroupComponent playerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
708 if (!playerGroupController)
712 if (playerGroupController.GetSelectedGroupID() == -1)
715 group =
m_GroupManager.FindGroup(playerGroupController.GetSelectedGroupID());
725 array<int> denied = {};
727 array<int> requesters = {};
730 bool requesterDenied = denied.Contains(playerGroupController.GetPlayerID());
731 bool requestSent = requesters.Contains(playerGroupController.GetPlayerID());
736 SCR_FactionCommanderPlayerComponent.IsLocalPlayerCommander() ||
753 array<SCR_GroupRolePresetConfig> groupRolePresetConfigs = {};
759 if (preset.GetGroupRole() == group.
GetGroupRole() && !preset.CanPlayerJoin())
770 SCR_PlayerControllerGroupComponent playerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
771 int focusedGroupId = playerGroupController.GetSelectedGroupID();
772 if (focusedGroupId != -1)
774 int groupId = playerGroupController.GetGroupID();
776 if (playerGroupController.HasInviteFromGroup(focusedGroupId))
778 else if (groupId == focusedGroupId)
789 SCR_PlayerControllerGroupComponent playerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
790 if (!playerGroupController)
794 if (playerGroupController.GetSelectedGroupID() == -1)
797 group =
m_GroupManager.FindGroup(playerGroupController.GetSelectedGroupID());
803 bool canRemove = playerGroupController.CanPlayerRemoveGroup(playerId, group);
822 ImageWidget taskIcon, muteIcon, background, loadoutIcon;
832 set<int> frequencies =
new set<int>();
834 playerName =
TextWidget.Cast(playerTile.FindAnyWidget(
"PlayerName"));
835 playerFrequency =
TextWidget.Cast(playerTile.FindAnyWidget(
"Frequency"));
836 m_wTaskLayout =
SizeLayoutWidget.Cast(playerTile.FindAnyWidget(
"TaskLayout"));
837 Widget wBackground =
ImageWidget.Cast(playerTile.FindAnyWidget(
"TaskIconBackground"));
840 muteIcon =
ImageWidget.Cast(playerTile.FindAnyWidget(
"MuteIcon"));
841 background =
ImageWidget.Cast(playerTile.FindAnyWidget(
"Background"));
842 loadoutIcon =
ImageWidget.Cast(playerTile.FindAnyWidget(
"LoadoutIcon"));
846 playerButton =
ButtonWidget.Cast(playerTile.FindAnyWidget(
"PlayerButton"));
859 playerCtrl.SetPlatformImageTo(playerID, platformIcon);
862 if (controlledEntity)
866 if (!frequencies.IsEmpty())
869 background.SetOpacity(0.85);
939 PlayerController pc =
GetGame().GetPlayerController();
943 SocialComponent sc = SocialComponent.Cast(pc.FindComponent(SocialComponent));
947 muteIcon.LoadImageFromSet(0,
UIConstants.ICONS_IMAGE_SET,
"sound-off");
956 playerLoadout = loadoutManager.GetPlayerLoadout(playerID);
960 res =
Resource.Load(playerLoadout.GetLoadoutResource());
964 container = source.GetObject(
"m_UIInfo");
966 info.SetIconTo(loadoutIcon);
978 Widget badge = playerTile.FindAnyWidget(
"PlayerBadge");
1034 if (!frequencyImage || !playerIcon || !callsign || !frequency || !playerCount)
1037 frequencyImage.SetColor(groupColor);
1038 playerIcon.SetColor(groupColor);
1039 callsign.SetColor(groupColor);
1040 frequency.SetColor(groupColor);
1041 playerCount.SetColor(groupColor);
1053 super.OnFocus(w, x, y);
1058 EInputDeviceType deviceType =
GetGame().GetInputManager().GetLastUsedInputDevice();
1059 if (deviceType == EInputDeviceType.GAMEPAD || deviceType == EInputDeviceType.KEYBOARD)
1080 return super.OnFocusLost(w, x, y);
1117 if (!playerOptionsButton)
1121 if (!playerOptionsCombo)
1126 int playerID =
GetGame().GetPlayerController().GetPlayerId();
1161 SCR_PlayerControllerGroupComponent playerGroupController = SCR_PlayerControllerGroupComponent.GetLocalPlayerControllerGroupComponent();
1163 if (!playerGroupController)
1173 switch (combo.GetItemName(
index))
1177 playerGroupController.InvitePlayer(playerID);
1183 playerGroupController.RequestKickPlayer(playerID);
1189 playerGroupController.RequestPromoteLeader(playerID);
1205 if (!privateChecker)
1209 if (!privateCheckerButton)
1217 if (!nameChangeButton)
1223 privateChecker.SetOpacity(0);
1224 privateChecker.SetEnabled(
false);
1225 nameChangeButton.SetOpacity(0);
1226 nameChangeButton.SetEnabled(
false);
1236 privateChecker.SetOpacity(1);
1237 privateChecker.SetEnabled(
true);
1238 nameChangeButton.SetOpacity(1);
1239 nameChangeButton.SetEnabled(
true);
1276 if (inputManager && inputManager.GetLastUsedInputDevice() == EInputDeviceType.GAMEPAD)
1298 badgeTop =
ImageWidget.Cast(badge.FindAnyWidget(
"BadgeTop"));
1299 badgeMiddle =
ImageWidget.Cast(badge.FindAnyWidget(
"BadgeMiddle"));
1300 badgeBottom =
ImageWidget.Cast(badge.FindAnyWidget(
"BadgeBottom"));
1302 if (!badgeMiddle || !badgeTop || !badgeBottom)
1305 badgeTop.SetColor(color);
1306 badgeMiddle.SetColor(color);
1307 badgeBottom.SetColor(color);
1329 array<SCR_ChimeraCharacter> aiMembers = slaveGroup.
GetAIMembers();
1330 SCR_CharacterIdentityComponent identityComponent;
1332 foreach (SCR_ChimeraCharacter AIcharacter : aiMembers)
1335 playerName =
TextWidget.Cast(playerTile.FindAnyWidget(
"PlayerName"));
1337 identityComponent = SCR_CharacterIdentityComponent .Cast(AIcharacter.FindComponent(SCR_CharacterIdentityComponent));
1338 if (!identityComponent)
1342 array<string> nameParams = {};
1343 identityComponent.GetFormattedFullName(name, nameParams);
1344 playerName.SetTextFormat(name, nameParams[0], nameParams[1], nameParams[2]);
1346 playerButton =
ButtonWidget.Cast(playerTile.FindAnyWidget(
"PlayerButton"));
1358 Widget badge = playerTile.FindAnyWidget(
"PlayerBadge");
ArmaReforgerScripted GetGame()
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
SCR_EGroupRole
Group roles.
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_LoadoutManager(IEntitySource src, IEntity parent)
ScriptInvokerBase< ScriptInvokerVoidMethod > ScriptInvokerVoid
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
void SCR_Task(IEntitySource src, IEntity parent)
Object holding reference to resource. In destructor release the resource.
array< SCR_ChimeraCharacter > GetAIMembers()
int GetPlayerCount(bool checkMasterAndSlaves=false)
bool IsPlayerLeader(int playerID)
SCR_EGroupRole GetGroupRole()
bool GetFlagIsFromImageSet()
array< int > GetPlayerIDs()
bool IsPrivacyChangeable()
int GetRequesterIDs(out array< int > valueArray)
ScriptInvoker GetOnMemberStateChange()
static ScriptInvoker GetOnPlayerLeaderChanged()
static ScriptInvoker GetOnJoinPrivateGroupRequest()
int GetDeniedRequesters(out array< int > valueArray)
string GetCustomDescription()
bool IsMaxMembersLimited()
bool IsPlayerInGroup(int playerID)
ResourceName GetGroupFlag()
override bool SetCurrentItem(int i, bool playSound=false, bool animate=false)
ResourceName GetGroupFlagImageSet()
Color GetOutlineFactionColor()
void GetGroupRolePresetConfigs(notnull array< SCR_GroupRolePresetConfig > groupArray)
ResourceName GetFactionFlag()
int GetGroupFlagTextures(out array< ResourceName > textures)
int GetFlagNames(out array< string > flagNames)
static int GetFrequencies(SCR_GadgetManagerComponent gadgetManager, out notnull set< int > outFrequencies)
void SetFlagButtonFromImageSet(string name)
static string GetTranslatedGroupName(notnull SCR_AIGroup group)
static string GetRoleName(notnull SCR_AIGroup group)
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
override int GetGroupID()
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()
EUserInteraction
Interaction type between two players.
proto external int GetPlayerId()