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_GameOverScreenInput.c
Go to the documentation of this file.
1
class
GameOverScreenInput
:
ChimeraMenuBase
2
{
3
protected
InputManager
m_InputManager
=
GetGame
().GetInputManager();
4
protected
Widget
m_BackButton
;
5
protected
Widget
m_ChatButton
;
6
protected
SCR_GameOverScreenUIComponent
m_GameOverScreenUIComponent
;
7
protected
SCR_ChatPanel
m_ChatPanel
;
8
9
override
void
OnMenuOpen
()
10
{
11
Widget
widgetRoot =
GetRootWidget
();
12
13
//~ Find Back button
14
m_BackButton
= widgetRoot.FindAnyWidget(
UIConstants
.BUTTON_BACK);
15
SCR_InputButtonComponent
comp =
SCR_InputButtonComponent
.
GetInputButtonComponent
(
UIConstants
.BUTTON_BACK, widgetRoot);
16
if
(comp)
17
comp.
m_OnActivated
.Insert(
ReturnToMainMenu
);
18
19
//~ Find Chat button
20
m_ChatButton
= widgetRoot.FindAnyWidget(
"ChatButton"
);
21
comp =
SCR_InputButtonComponent
.
GetInputButtonComponent
(
"ChatButton"
, widgetRoot);
22
if
(comp)
23
comp.
m_OnActivated
.Insert(
OnChatToggle
);
24
25
//~ Find chat
26
Widget
wChatPanel =
GetRootWidget
().FindAnyWidget(
"ChatPanel"
);
27
if
(wChatPanel)
28
m_ChatPanel
=
SCR_ChatPanel
.Cast(wChatPanel.FindHandler(
SCR_ChatPanel
));
29
30
//~ Find GameOverScreen UI
31
m_GameOverScreenUIComponent
=
SCR_GameOverScreenUIComponent
.Cast(widgetRoot.FindHandler(
SCR_GameOverScreenUIComponent
));
32
33
// Hide unnecessary HUD elements. This should hide chat as well.
34
SCR_HUDManagerComponent
hudManager =
GetGame
().
GetHUDManager
();
35
if
(hudManager)
36
hudManager.
SetVisibleLayers
(hudManager.
GetVisibleLayers
() & ~(
EHudLayers
.HIGH |
EHudLayers
.ALWAYS_TOP));
37
38
GetGame
().GetInputManager().AddActionListener(
"ShowScoreboard"
,
EActionTrigger
.DOWN,
ShowPlayerList
);
39
}
40
41
override
void
OnMenuClose
()
42
{
43
super.OnMenuClose();
44
45
// Show back the previously hidden HUD elements.
46
PlayerController pc =
GetGame
().GetPlayerController();
47
if
(pc)
48
{
49
SCR_HUDManagerComponent
hudManager =
GetGame
().
GetHUDManager
();
50
if
(hudManager)
51
hudManager.
SetVisibleLayers
(hudManager.
GetVisibleLayers
() |
EHudLayers
.HIGH |
EHudLayers
.ALWAYS_TOP);
52
}
53
GetGame
().GetInputManager().RemoveActionListener(
"ShowScoreboard"
,
EActionTrigger
.DOWN,
ShowPlayerList
);
54
}
55
56
override
void
OnMenuUpdate
(
float
tDelta)
57
{
58
super.OnMenuUpdate(tDelta);
59
60
if
(
m_ChatPanel
)
61
m_ChatPanel
.OnUpdateChat(tDelta);
62
}
63
64
protected
void
OnChatToggle
()
65
{
66
if
(!
m_ChatPanel
||
m_ChatPanel
.IsOpen() || (
m_ChatButton
&& (!
m_ChatButton
.IsVisible() ||
m_ChatButton
.GetOpacity() != 1)))
67
return
;
68
69
SCR_ChatPanelManager
.
GetInstance
().
ToggleChatPanel
(
m_ChatPanel
);
70
}
71
72
protected
void
BackToMainMenuPopupComfirm
()
73
{
74
Close
();
75
GameStateTransitions
.RequestGameplayEndTransition();
76
}
77
78
protected
void
OnBackToMainMenu
()
79
{
80
SCR_ConfigurableDialogUi
dlg =
SCR_CommonDialogs
.CreateDialog(
"scenario_exit"
);
81
if
(!dlg)
82
return
;
83
84
dlg.
m_OnConfirm
.Insert(
BackToMainMenuPopupComfirm
);
85
}
86
87
void
ReturnToMainMenu
()
88
{
89
if
(
m_BackButton
&& (!
m_BackButton
.IsVisible() ||
m_BackButton
.GetOpacity() != 1))
90
return
;
91
92
OnBackToMainMenu
();
93
}
94
95
//------------------------------------------------------------------------------------------------
96
void
ShowPlayerList
()
97
{
98
GetGame
().GetMenuManager().OpenMenu(
ChimeraMenuPreset
.PlayerListMenu, 0,
true
,
false
);
99
}
100
};
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition
ChimeraMenuBase.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
EHudLayers
EHudLayers
Definition
SCR_HUDManagerComponent.c:6
GetRootWidget
Widget GetRootWidget()
Definition
SCR_ModularButtonComponent.c:189
Close
proto native void Close()
Definition
SCR_WorkshopDialogs.c:77
ChimeraMenuBase
Constant variables used in various menus.
Definition
ChimeraMenuBase.c:72
GameOverScreenInput
Definition
SCR_GameOverScreenInput.c:2
GameOverScreenInput::m_BackButton
Widget m_BackButton
Definition
SCR_GameOverScreenInput.c:4
GameOverScreenInput::OnChatToggle
void OnChatToggle()
Definition
SCR_GameOverScreenInput.c:64
GameOverScreenInput::m_GameOverScreenUIComponent
SCR_GameOverScreenUIComponent m_GameOverScreenUIComponent
Definition
SCR_GameOverScreenInput.c:6
GameOverScreenInput::BackToMainMenuPopupComfirm
void BackToMainMenuPopupComfirm()
Definition
SCR_GameOverScreenInput.c:72
GameOverScreenInput::OnBackToMainMenu
void OnBackToMainMenu()
Definition
SCR_GameOverScreenInput.c:78
GameOverScreenInput::OnMenuClose
override void OnMenuClose()
Definition
SCR_GameOverScreenInput.c:41
GameOverScreenInput::ShowPlayerList
void ShowPlayerList()
Definition
SCR_GameOverScreenInput.c:96
GameOverScreenInput::OnMenuOpen
override void OnMenuOpen()
Definition
SCR_GameOverScreenInput.c:9
GameOverScreenInput::ReturnToMainMenu
void ReturnToMainMenu()
Definition
SCR_GameOverScreenInput.c:87
GameOverScreenInput::m_InputManager
InputManager m_InputManager
Definition
SCR_GameOverScreenInput.c:3
GameOverScreenInput::OnMenuUpdate
override void OnMenuUpdate(float tDelta)
Definition
SCR_GameOverScreenInput.c:56
GameOverScreenInput::m_ChatButton
Widget m_ChatButton
Definition
SCR_GameOverScreenInput.c:5
GameOverScreenInput::m_ChatPanel
SCR_ChatPanel m_ChatPanel
Definition
SCR_GameOverScreenInput.c:7
GameStateTransitions
Definition
GameStateTransitions.c:13
InputManager
Input management system for user interactions.
Definition
InputManager.c:20
SCR_ChatPanel
Definition
SCR_ChatPanel.c:7
SCR_ChatPanelManager
Definition
SCR_ChatPanelManager.c:13
SCR_ChatPanelManager::GetInstance
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
Definition
SCR_ChatPanelManager.c:127
SCR_ChatPanelManager::ToggleChatPanel
void ToggleChatPanel(notnull SCR_ChatPanel panel)
Toggles the chat panel: opens if it's closed, closes if it's open.
Definition
SCR_ChatPanelManager.c:65
SCR_CommonDialogs
Definition
CommonDialogs.c:6
SCR_ConfigurableDialogUi
Definition
SCR_ConfigurableDialogUI.c:17
SCR_ConfigurableDialogUi::m_OnConfirm
ref ScriptInvoker m_OnConfirm
Definition
SCR_ConfigurableDialogUI.c:47
SCR_GameOverScreenUIComponent
Definition
SCR_GameOverScreenUIComponent.c:2
SCR_HUDManagerComponent
Definition
SCR_HUDManagerComponent.c:24
SCR_HUDManagerComponent::SetVisibleLayers
void SetVisibleLayers(EHudLayers layers=-1)
Definition
SCR_HUDManagerComponent.c:384
SCR_HUDManagerComponent::GetHUDManager
static SCR_HUDManagerComponent GetHUDManager()
Definition
SCR_HUDManagerComponent.c:419
SCR_HUDManagerComponent::GetVisibleLayers
EHudLayers GetVisibleLayers()
Definition
SCR_HUDManagerComponent.c:408
SCR_InputButtonComponent
Definition
SCR_InputButtonComponent.c:2
SCR_InputButtonComponent::m_OnActivated
ref ScriptInvoker m_OnActivated
Definition
SCR_InputButtonComponent.c:153
SCR_InputButtonComponent::GetInputButtonComponent
static SCR_InputButtonComponent GetInputButtonComponent(string name, notnull Widget parent, bool searchAllChildren=true)
Definition
SCR_InputButtonComponent.c:1212
UIConstants
Definition
Constants.c:151
Widget
Definition
Widget.c:13
EActionTrigger
EActionTrigger
Definition
EActionTrigger.c:13
scripts
Game
UI
GameOverScreen
SCR_GameOverScreenInput.c
Generated by
1.17.0