4 override void OnMenuOpen()
10 cancel.m_OnActivated.Insert(Close);
12 SCR_AIGroup.GetOnJoinPrivateGroupRequest().Insert(UpdateTabs);
13 SCR_AIGroup.GetOnPlayerLeaderChanged().Insert(UpdateTabs);
17 override void OnMenuShow()
25 override void OnMenuClose()
29 SCR_AIGroup.GetOnJoinPrivateGroupRequest().Remove(UpdateTabs);
30 SCR_AIGroup.GetOnPlayerLeaderChanged().Remove(UpdateTabs);
41 int playerID =
GetGame().GetPlayerController().GetPlayerId();
43 SCR_AIGroup group = groupsManager.GetPlayerGroup(playerID);
47 if (!groupsManager.IsPlayerInAnyGroup(playerID) || !group.IsPlayerLeader(playerID))
49 m_SuperMenuComponent.GetTabView().EnableTab(1,
false,
true);
53 m_SuperMenuComponent.GetTabView().EnableTab(1,
true,
true);
55 array<int> requesters = {};
56 group.GetRequesterIDs(requesters);
58 if (requesters.IsEmpty())
60 m_SuperMenuComponent.GetTabView().ShowIcon(1,
false);
64 m_SuperMenuComponent.GetTabView().ShowIcon(1,
true);
66 Widget notificationIcon = m_SuperMenuComponent.GetTabView().GetEntryIcon(1);
67 if (!notificationIcon)
70 TextWidget text = TextWidget.Cast(notificationIcon.FindAnyWidget(
"NotificationCount"));
74 if (requesters.Count() > 99)
77 text.SetText(requesters.Count().ToString());