Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GameOverScreenInput.c
Go to the documentation of this file.
2{
3 protected InputManager m_InputManager = GetGame().GetInputManager();
8
9 override void OnMenuOpen()
10 {
11 Widget widgetRoot = GetRootWidget();
12
13 //~ Find Back button
14 m_BackButton = widgetRoot.FindAnyWidget(UIConstants.BUTTON_BACK);
16 if (comp)
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
32
33 // Hide unnecessary HUD elements. This should hide chat as well.
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 {
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
70 }
71
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
85 }
86
88 {
89 if (m_BackButton && (!m_BackButton.IsVisible() || m_BackButton.GetOpacity() != 1))
90 return;
91
93 }
94
95 //------------------------------------------------------------------------------------------------
97 {
98 GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.PlayerListMenu, 0, true, false);
99 }
100};
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
Widget GetRootWidget()
proto native void Close()
Constant variables used in various menus.
SCR_GameOverScreenUIComponent m_GameOverScreenUIComponent
override void OnMenuUpdate(float tDelta)
Input management system for user interactions.
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
void ToggleChatPanel(notnull SCR_ChatPanel panel)
Toggles the chat panel: opens if it's closed, closes if it's open.
void SetVisibleLayers(EHudLayers layers=-1)
static SCR_HUDManagerComponent GetHUDManager()
static SCR_InputButtonComponent GetInputButtonComponent(string name, notnull Widget parent, bool searchAllChildren=true)
EActionTrigger