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_SettingsSuperMenu.c
Go to the documentation of this file.
1
2
class
SCR_SettingsSuperMenu
:
SCR_SuperMenuBase
3
{
4
//------------------------------------------------------------------------------------------------
5
override
void
OnMenuOpen
()
6
{
7
super.
OnMenuOpen
();
8
9
SCR_InputButtonComponent
comp =
SCR_InputButtonComponent
.
GetInputButtonComponent
(
UIConstants
.BUTTON_BACK,
GetRootWidget
());
10
if
(comp)
11
comp.
m_OnActivated
.Insert(OnBack);
12
13
bool
showBlur = !
GetGame
().m_bIsMainMenuOpen;
14
15
Widget
img =
GetRootWidget
().FindAnyWidget(
"MenuBackground"
);
16
if
(img)
17
img.SetVisible(!showBlur);
18
19
BlurWidget
blur =
BlurWidget
.Cast(
GetRootWidget
().FindAnyWidget(
"Blur0"
));
20
if
(blur)
21
{
22
blur.SetVisible(showBlur);
23
if
(showBlur)
24
{
25
float
w, h;
26
GetGame
().GetWorkspace().GetScreenSize(w, h);
27
blur.SetSmoothBorder(0, 0, w * 0.8, 0);
28
}
29
}
30
31
bool
isDebug =
DiagMenu
.GetBool(
SCR_DebugMenuID
.DEBUGUI_UI_SHOW_ALL_SETTINGS,
false
);
32
33
if
(!isDebug &&
System
.GetPlatform() ==
EPlatform
.WINDOWS)
34
{
35
m_SuperMenuComponent
.GetTabView().RemoveTabByIdentifier(
"SettingsVideoConsole"
);
36
m_SuperMenuComponent
.GetTabView().ShowTabByIdentifier(identifier:
"SettingsVideoPC"
, playSound:
false
);
37
}
38
39
// Remove video settings for consoles, if not in settings debug mode
40
#ifdef PLATFORM_CONSOLE
41
if
(isDebug)
42
return
;
43
44
m_SuperMenuComponent
.GetTabView().RemoveTabByIdentifier(
"SettingsVideoPC"
);
45
m_SuperMenuComponent
.GetTabView().ShowTabByIdentifier(identifier:
"SettingsVideoConsole"
, playSound:
false
);
46
#endif
47
}
48
49
//------------------------------------------------------------------------------------------------
50
override
void
OnMenuShow
()
51
{
52
super.OnMenuShow();
53
54
//SCR_AnalyticsApplication.GetInstance().OpenSettings();
55
}
56
57
//------------------------------------------------------------------------------------------------
58
override
void
OnMenuHide
()
59
{
60
super.OnMenuHide();
61
62
//SCR_AnalyticsApplication.GetInstance().CloseSettings();
63
}
64
65
//------------------------------------------------------------------------------------------------
66
void
OnBack
()
67
{
68
Close
();
69
}
70
};
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition
DebugMenuID.c:4
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
OnBack
void OnBack()
Definition
MainMenuUI.c:459
GetRootWidget
Widget GetRootWidget()
Definition
SCR_ModularButtonComponent.c:189
Close
proto native void Close()
Definition
SCR_WorkshopDialogs.c:77
BlurWidget
Definition
BlurWidget.c:13
DiagMenu
Diagnostic and developer menu system.
Definition
DiagMenu.c:18
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
SCR_SettingsSuperMenu
Definition
SCR_SettingsSuperMenu.c:3
SCR_SuperMenuBase
Definition
SCR_SuperMenuBase.c:7
SCR_SuperMenuBase::m_SuperMenuComponent
SCR_SuperMenuComponent m_SuperMenuComponent
Definition
SCR_SuperMenuBase.c:8
SCR_SuperMenuBase::OnMenuHide
override void OnMenuHide()
Definition
SCR_SuperMenuBase.c:35
SCR_SuperMenuBase::OnMenuOpen
override void OnMenuOpen()
Definition
SCR_SuperMenuBase.c:11
SCR_SuperMenuBase::OnMenuShow
override void OnMenuShow()
Definition
SCR_SuperMenuBase.c:26
System
Definition
System.c:13
UIConstants
Definition
Constants.c:151
Widget
Definition
Widget.c:13
EPlatform
EPlatform
Definition
EPlatform.c:13
scripts
Game
UI
Menu
SubMenu
SCR_SettingsSuperMenu.c
Generated by
1.17.0