Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_NoGameMasterStickyNotificationUIComponent.c
Go to the documentation of this file.
1
class
SCR_NoGameMasterStickyNotificationUIComponent
:
SCR_StickyNotificationUIComponent
2
{
3
protected
SCR_PlayerDelegateEditorComponent
m_DelegateManager
;
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
{
15
CheckShowNotification
();
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.
33
SCR_GameModeEditor
gameMode =
SCR_GameModeEditor
.Cast(
GetGame
().
GetGameMode
());
34
if
(gameMode && gameMode.
GetGameMasterTarget
() ==
EGameModeEditorTarget
.VOTE)
35
{
36
m_DelegateManager
=
SCR_PlayerDelegateEditorComponent
.Cast(
SCR_PlayerDelegateEditorComponent
.GetInstance(
SCR_PlayerDelegateEditorComponent
));
37
if
(
m_DelegateManager
)
38
{
39
m_DelegateManager
.GetOnLimitedEditorChanged().Insert(
OnLimitedEditorChanged
);
40
CheckShowNotification
(
true
);
41
return
;
42
}
43
}
44
45
SetVisible
(
false
);
46
}
47
48
//------------------------------------------------------------------------------------------------
49
protected
override
void
OnDestroy
()
50
{
51
if
(
m_DelegateManager
)
52
m_DelegateManager
.GetOnLimitedEditorChanged().Remove(
OnLimitedEditorChanged
);
53
}
54
}
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition
ChimeraMenuBase.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
GetGameMode
SCR_BaseGameMode GetGameMode()
Definition
SCR_BaseGameModeComponent.c:15
EGameModeEditorTarget
EGameModeEditorTarget
Definition
SCR_GameModeEditor.c:151
MenuManager
Definition
MenuManager.c:13
MenuManager::OpenDialog
proto external MenuBase OpenDialog(ScriptMenuPresetEnum preset, int priority=DialogPriority.INFORMATIVE, int iUserData=0, bool unique=false)
SCR_GameModeEditor
Definition
SCR_GameModeEditor.c:8
SCR_GameModeEditor::GetGameMasterTarget
EGameModeEditorTarget GetGameMasterTarget()
Definition
SCR_GameModeEditor.c:27
SCR_NoGameMasterStickyNotificationUIComponent
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:2
SCR_NoGameMasterStickyNotificationUIComponent::OnLimitedEditorChanged
void OnLimitedEditorChanged()
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:13
SCR_NoGameMasterStickyNotificationUIComponent::OnDestroy
override void OnDestroy()
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:49
SCR_NoGameMasterStickyNotificationUIComponent::OnInit
override void OnInit(SCR_NotificationsLogComponent notificationLog)
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:28
SCR_NoGameMasterStickyNotificationUIComponent::OnButton
override void OnButton()
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:19
SCR_NoGameMasterStickyNotificationUIComponent::CheckShowNotification
void CheckShowNotification(bool isInit=false)
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:6
SCR_NoGameMasterStickyNotificationUIComponent::m_DelegateManager
SCR_PlayerDelegateEditorComponent m_DelegateManager
Definition
SCR_NoGameMasterStickyNotificationUIComponent.c:3
SCR_NotificationsLogComponent
Definition
SCR_NotificationsLogUIComponent.c:7
SCR_PlayerDelegateEditorComponent
Definition
SCR_PlayerDelegateEditorComponent.c:10
SCR_StickyNotificationUIComponent
Definition
SCR_StickyNotificationUIComponent.c:2
SCR_StickyNotificationUIComponent::SetVisible
void SetVisible(bool visible)
Definition
SCR_StickyNotificationUIComponent.c:73
SCR_StickyNotificationUIComponent::SetStickyActive
void SetStickyActive(bool newActive, bool fade=true)
Definition
SCR_StickyNotificationUIComponent.c:24
scripts
Game
UI
Components
Notification
SCR_NoGameMasterStickyNotificationUIComponent.c
Generated by
1.17.0