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_MapMenuUI.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
3
class
SCR_MapMenuUI
:
ChimeraMenuBase
4
{
5
protected
SCR_MapEntity
m_MapEntity
;
6
protected
SCR_ChatPanel
m_ChatPanel
;
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
)
45
m_MapEntity
=
SCR_MapEntity
.
GetMapInstance
();
46
}
47
48
//------------------------------------------------------------------------------------------------
49
override
void
OnMenuUpdate
(
float
tDelta)
50
{
51
if
(
m_ChatPanel
)
52
m_ChatPanel
.OnUpdateChat(tDelta);
53
}
54
55
//------------------------------------------------------------------------------------------------
56
void
Callback_OnChatToggleAction
()
57
{
58
if
(!
m_ChatPanel
)
59
return
;
60
61
if
(!
m_ChatPanel
.IsOpen())
62
SCR_ChatPanelManager
.
GetInstance
().
OpenChatPanel
(
m_ChatPanel
);
63
}
64
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
EMapEntityMode
EMapEntityMode
Mode of the map.
Definition
SCR_MapConstants.c:29
GetRootWidget
Widget GetRootWidget()
Definition
SCR_ModularButtonComponent.c:189
ChimeraMenuBase
Constant variables used in various menus.
Definition
ChimeraMenuBase.c:72
MapConfiguration
Definition
MapConfiguration.c:3
SCR_ChatPanel
Definition
SCR_ChatPanel.c:7
SCR_ChatPanelManager
Definition
SCR_ChatPanelManager.c:13
SCR_ChatPanelManager::OpenChatPanel
void OpenChatPanel(notnull SCR_ChatPanel panel)
Opens the chat panel and ensures that all other panels are closed.
Definition
SCR_ChatPanelManager.c:41
SCR_ChatPanelManager::GetInstance
static SCR_ChatPanelManager GetInstance()
Returns SCR_ChatPanelManager instance.
Definition
SCR_ChatPanelManager.c:127
SCR_MapEntity
Definition
SCR_MapEntity.c:18
SCR_MapEntity::GetMapInstance
static SCR_MapEntity GetMapInstance()
Get map entity instance.
Definition
SCR_MapEntity.c:112
SCR_MapMenuUI
Fullscreen map menu.
Definition
SCR_MapMenuUI.c:4
SCR_MapMenuUI::m_MapEntity
SCR_MapEntity m_MapEntity
Definition
SCR_MapMenuUI.c:5
SCR_MapMenuUI::OnMenuClose
override void OnMenuClose()
Definition
SCR_MapMenuUI.c:33
SCR_MapMenuUI::OnMenuInit
override void OnMenuInit()
Definition
SCR_MapMenuUI.c:42
SCR_MapMenuUI::Callback_OnChatToggleAction
void Callback_OnChatToggleAction()
Definition
SCR_MapMenuUI.c:56
SCR_MapMenuUI::OnMenuOpen
override void OnMenuOpen()
Definition
SCR_MapMenuUI.c:9
SCR_MapMenuUI::OnMenuUpdate
override void OnMenuUpdate(float tDelta)
Definition
SCR_MapMenuUI.c:49
SCR_MapMenuUI::m_ChatPanel
SCR_ChatPanel m_ChatPanel
Definition
SCR_MapMenuUI.c:6
Widget
Definition
Widget.c:13
EActionTrigger
EActionTrigger
Definition
EActionTrigger.c:13
scripts
Game
Map
SCR_MapMenuUI.c
Generated by
1.17.0