Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapMenuUI.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
7
8 //------------------------------------------------------------------------------------------------
9 override void OnMenuOpen()
10 {
11 if (m_MapEntity)
12 {
13 BaseGameMode gameMode = GetGame().GetGameMode();
14 if (!gameMode)
15 return;
16
17 SCR_MapConfigComponent configComp = SCR_MapConfigComponent.Cast(gameMode.FindComponent(SCR_MapConfigComponent));
18 if (!configComp)
19 return;
20
21 MapConfiguration mapConfigFullscreen = m_MapEntity.SetupMapConfig(EMapEntityMode.FULLSCREEN, configComp.GetGadgetMapConfig(), GetRootWidget());
22 m_MapEntity.OpenMap(mapConfigFullscreen);
23 }
24
25 Widget wChatPanel = GetRootWidget().FindAnyWidget("ChatPanel");
26 if (wChatPanel)
27 m_ChatPanel = SCR_ChatPanel.Cast(wChatPanel.FindHandler(SCR_ChatPanel));
28
29 GetGame().GetInputManager().AddActionListener("ChatToggle", EActionTrigger.DOWN, Callback_OnChatToggleAction);
30 }
31
32 //------------------------------------------------------------------------------------------------
33 override void OnMenuClose()
34 {
35 if (m_MapEntity)
36 m_MapEntity.CloseMap();
37
38 GetGame().GetInputManager().RemoveActionListener("ChatToggle", EActionTrigger.DOWN, Callback_OnChatToggleAction);
39 }
40
41 //------------------------------------------------------------------------------------------------
42 override void OnMenuInit()
43 {
44 if (!m_MapEntity)
46 }
47
48 //------------------------------------------------------------------------------------------------
49 override void OnMenuUpdate(float tDelta)
50 {
51 if (m_ChatPanel)
52 m_ChatPanel.OnUpdateChat(tDelta);
53 }
54
55 //------------------------------------------------------------------------------------------------
57 {
58 if (!m_ChatPanel)
59 return;
60
61 if (!m_ChatPanel.IsOpen())
63 }
64};
ArmaReforgerScripted GetGame()
Definition game.c:1398
EMapEntityMode
Mode of the map.
Widget GetRootWidget()
Constant variables used in various menus.
void OpenChatPanel(notnull SCR_ChatPanel panel)
Opens the chat panel and ensures that all other panels are closed.
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Fullscreen map menu.
SCR_MapEntity m_MapEntity
override void OnMenuClose()
override void OnMenuInit()
void Callback_OnChatToggleAction()
override void OnMenuOpen()
override void OnMenuUpdate(float tDelta)
SCR_ChatPanel m_ChatPanel
EActionTrigger