Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
ContentBrowserDetailsMenu.c
Go to the documentation of this file.
1 
3 {
4  protected SCR_ContentBrowser_AddonsSubMenu m_DependencySubMenu;
5 
6  protected static SCR_WorkshopItem m_WorkshopItem;
7  protected SCR_InputButtonComponent m_NavBack;
8 
9  //------------------------------------------------------------------------------------------------
10  override void OnMenuOpen()
11  {
12  if (!m_WorkshopItem)
13  {
14  Close();
15  GetGame().GetCallqueue().CallLater(SCR_CommonDialogs.CreateRequestErrorDialog);
16  return;
17  }
18 
19  super.OnMenuOpen();
20 
21  SCR_ModDetailsSuperMenuComponent detailsSuperMenu = SCR_ModDetailsSuperMenuComponent.Cast(m_SuperMenuComponent);
22  if (detailsSuperMenu)
23  detailsSuperMenu.SetWorkshopItem(m_WorkshopItem);
24 
25  // Setup the 'back' nav button
26  m_NavBack = m_DynamicFooter.FindButton("Back");
27  if (m_NavBack)
28  m_NavBack.m_OnActivated.Insert(OnNavButtonClose);
29  }
30 
31  //------------------------------------------------------------------------------------------------
32  protected void OnNavButtonClose()
33  {
34  // This menu might be not focused, because another details menu is currently open
35  if (IsFocused())
36  Close();
37  }
38 
39  // Public
40  //------------------------------------------------------------------------------------------------
42  static ContentBrowserDetailsMenu OpenForWorkshopItem(SCR_WorkshopItem item)
43  {
44  m_WorkshopItem = item;
45 
46  ContentBrowserDetailsMenu detailsMenu = ContentBrowserDetailsMenu.Cast(GetGame().GetMenuManager().OpenMenu(ChimeraMenuPreset.ContentBrowserDetailsMenu));
47  return detailsMenu;
48  }
49 
50  //------------------------------------------------------------------------------------------------
51  static SCR_WorkshopItem GetWorkshopItem()
52  {
53  return m_WorkshopItem;
54  }
55 }
m_WorkshopItem
enum SCR_EModDetailsMenuTabs m_WorkshopItem
m_NavBack
enum EWorkshopTabId m_NavBack
The super menu class for WORKSHOP content browser.
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_CommonDialogs
Definition: CommonDialogs.c:5
SCR_WorkshopItem
Definition: SCR_WorkshopItem.c:21
ContentBrowserDetailsMenu
Definition: ContentBrowserDetailsMenu.c:2
SCR_SuperMenuBase
Definition: SCR_SuperMenuBase.c:6
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition: ChimeraMenuBase.c:3
SCR_InputButtonComponent
Definition: SCR_InputButtonComponent.c:1