Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_SettingsSuperMenu.c
Go to the documentation of this file.
1
3{
4 //------------------------------------------------------------------------------------------------
5 override void OnMenuOpen()
6 {
7 super.OnMenuOpen();
8
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
This enum contains all IDs for DiagMenu entries added in script.
Definition DebugMenuID.c:4
ArmaReforgerScripted GetGame()
Definition game.c:1398
void OnBack()
Definition MainMenuUI.c:459
Widget GetRootWidget()
proto native void Close()
Diagnostic and developer menu system.
Definition DiagMenu.c:18
static SCR_InputButtonComponent GetInputButtonComponent(string name, notnull Widget parent, bool searchAllChildren=true)
SCR_SuperMenuComponent m_SuperMenuComponent
override void OnMenuHide()
override void OnMenuOpen()
override void OnMenuShow()
EPlatform
Definition EPlatform.c:13