Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SettingsSuperMenu.c
Go to the documentation of this file.
1 
3 {
4  //------------------------------------------------------------------------------------------------
5  override void OnMenuOpen()
6  {
7  super.OnMenuOpen();
8 
9  SCR_InputButtonComponent comp = SCR_InputButtonComponent.GetInputButtonComponent("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("SettingsVideoPC");
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("SettingsVideoConsole");
46 #endif
47  }
48 
49  //------------------------------------------------------------------------------------------------
50  void OnBack()
51  {
52  Close();
53  }
54 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_SettingsSuperMenu
Definition: SCR_SettingsSuperMenu.c:2
GetRootWidget
Widget GetRootWidget()
Definition: SCR_UITaskManagerComponent.c:160
SCR_SuperMenuBase
Definition: SCR_SuperMenuBase.c:6
SCR_DebugMenuID
SCR_DebugMenuID
This enum contains all IDs for DiagMenu entries added in script.
Definition: DebugMenuID.c:3
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1