Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ProfileSuperMenu.c
Go to the documentation of this file.
6
7class SCR_ProfileSuperMenu : SCR_SuperMenuBase
8{
9 SCR_ModularButtonComponent m_Logo;
10
11 //------------------------------------------------------------------------------------------------
12 override void OnMenuOpen()
13 {
14 super.OnMenuOpen();
15
16 SCR_InputButtonComponent comp = m_DynamicFooter.FindButton(UIConstants.BUTTON_BACK);
17 if (comp)
18 comp.m_OnActivated.Insert(Close);
19
20 Widget logoWidget = GetRootWidget().FindAnyWidget("LogoButton");
21 if (logoWidget)
22 {
23 m_Logo = SCR_ModularButtonComponent.FindComponent(logoWidget);
24 if (m_Logo)
25 m_Logo.m_OnClicked.Insert(OnLogoClicked);
26 }
27
28 // Setup automatic focusing on tab show
29 if (!m_SuperMenuComponent)
30 return;
31
32 SCR_TabViewComponent tabView = m_SuperMenuComponent.GetTabView();
33 if (tabView)
34 tabView.GetOnContentShow().Insert(OnTabContentShow);
35
36 if (GetGame().GetPlatformService().GetLocalPlatformKind() == PlatformKind.PSN)
37 tabView.RemoveTabByIdentifier("Community");
38 }
39
40 //------------------------------------------------------------------------------------------------
41 override void OnMenuShow()
42 {
43 super.OnMenuShow();
44
45 ResetFocus();
46 }
47
48 //------------------------------------------------------------------------------------------------
49 protected void OnLogoClicked()
50 {
51 GetGame().GetMenuManager().OpenDialog(ChimeraMenuPreset.WelcomeDialog);
52 }
53
54 //------------------------------------------------------------------------------------------------
55 protected void OnTabContentShow(SCR_TabViewComponent tabView, Widget widget)
56 {
57 ResetFocus();
58 }
59
60 //------------------------------------------------------------------------------------------------
61 protected void ResetFocus()
62 {
63 if (m_Logo)
64 GetGame().GetWorkspace().SetFocusedWidget(m_Logo.GetRootWidget());
65 }
66}
ChimeraMenuPreset
Menu presets.
ArmaReforgerScripted GetGame()
Definition game.c:1398
PlatformKind
Definition PlatformKind.c:8
Widget GetRootWidget()
void OnLogoClicked()
enum SCR_EProfileSuperMenuTabId m_Logo
void ResetFocus()
SCR_EProfileSuperMenuTabId
@ COMMUNITY
void OnTabContentShow(SCR_TabViewComponent tabView, Widget widget)
proto native void Close()
override void OnMenuOpen()
override void OnMenuShow()
ScriptInvokerTabView GetOnContentShow()
void RemoveTabByIdentifier(string identifier)