Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_NoGameMasterStickyNotificationUIComponent.c
Go to the documentation of this file.
2{
4
5 //------------------------------------------------------------------------------------------------
6 protected void CheckShowNotification(bool isInit = false)
7 {
8 //Check if there is at least one GM. If not, set the sticky active else hide the sticky
9 SetStickyActive(!m_DelegateManager.HasPlayerWithUnlimitedEditor(), !isInit);
10 }
11
12 //------------------------------------------------------------------------------------------------
13 protected void OnLimitedEditorChanged()
14 {
16 }
17
18 //------------------------------------------------------------------------------------------------
19 protected override void OnButton()
20 {
21 MenuManager menuManager = GetGame().GetMenuManager();
22
23 if (menuManager)
24 menuManager.OpenDialog(ChimeraMenuPreset.PlayerListMenu);
25 }
26
27 //------------------------------------------------------------------------------------------------
28 override void OnInit(SCR_NotificationsLogComponent notificationLog)
29 {
30 super.OnInit(notificationLog);
31
32 //Never show if everybody is GM or nobody is GM.
34 if (gameMode && gameMode.GetGameMasterTarget() == EGameModeEditorTarget.VOTE)
35 {
38 {
39 m_DelegateManager.GetOnLimitedEditorChanged().Insert(OnLimitedEditorChanged);
41 return;
42 }
43 }
44
45 SetVisible(false);
46 }
47
48 //------------------------------------------------------------------------------------------------
49 protected override void OnDestroy()
50 {
52 m_DelegateManager.GetOnLimitedEditorChanged().Remove(OnLimitedEditorChanged);
53 }
54}
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_BaseGameMode GetGameMode()
EGameModeEditorTarget
proto external MenuBase OpenDialog(ScriptMenuPresetEnum preset, int priority=DialogPriority.INFORMATIVE, int iUserData=0, bool unique=false)
EGameModeEditorTarget GetGameMasterTarget()
override void OnInit(SCR_NotificationsLogComponent notificationLog)
void SetStickyActive(bool newActive, bool fade=true)