Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_InventoryOpenedStorageUI.c
Go to the documentation of this file.
2 {
3  protected bool m_bFromVicinity;
4 
5  override void HandlerAttached(Widget w)
6  {
7  super.HandlerAttached(w);
8  InitPaging();
9  SetRowsAndColumns();
10  CreateEmptyLayout();
11  CreateSlots();
12  SortSlots();
13  ShowPage(0);
14  }
15 
16  protected override int CreateSlots()
17  {
18  array<IEntity> pItemsInStorage = {};
19  GetAllItems(pItemsInStorage, GetCurrentNavigationStorage());
20  UpdateOwnedSlots(pItemsInStorage);
21  return 0;
22  }
23 
24  protected override void GetAllItems(out notnull array<IEntity> pItemsInStorage, BaseInventoryStorageComponent pStorage = null)
25  {
26  super.GetAllItems(pItemsInStorage, pStorage);
27  }
28 
29  ButtonWidget ActivateCloseStorageButton()
30  {
31  m_wCloseStorageButton = ButtonWidget.Cast(m_widget.FindAnyWidget("CloseStorageBtn"));
32  if (m_wCloseStorageButton)
33  {
34  m_wCloseStorageButton.SetVisible(true);
36  if (nav)
37  {
38  if (GetGame().GetInputManager().GetLastUsedInputDevice() == EInputDeviceType.GAMEPAD)
39  nav.EnableCloseWithGamepad(false);
40  nav.m_OnActivated.Insert(CloseStorage);
41  }
42  }
43 
44  return m_wCloseStorageButton;
45  }
46 
47  void CloseStorage()
48  {
49  m_MenuHandler.RemoveOpenStorage(this);
50  }
51 
52  bool IsFromVicinity()
53  {
54  return m_bFromVicinity;
55  }
56 
58  BaseInventoryStorageComponent storage,
59  LoadoutAreaType slotID = null,
60  SCR_InventoryMenuUI menuManager = null,
61  int iPage = 0,
62  array<BaseInventoryStorageComponent> aTraverseStorage = null,
63  int cols = 6,
64  int rows = 3,
65  bool fromVicinity = false)
66  {
67  m_Storage = storage;
68  m_iMaxRows = rows;
69  m_iMaxColumns = cols;
70  m_bFromVicinity = fromVicinity;
71  m_iMatrix = new SCR_Matrix(m_iMaxColumns, m_iMaxRows);
72  if (aTraverseStorage)
73  m_aTraverseStorage.Copy(aTraverseStorage);
74  SetSlotAreaType(slotID);
75  }
76 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_InventoryStorageBaseUI
Definition: SCR_InventoryStorageBaseUI.c:6
SCR_InventoryNavigationButtonBack
Interactive non-focus button showing hint, and triggering actions.
Definition: SCR_InventoryNavigationButtonBack.c:4
SCR_InventoryOpenedStorageUI
Definition: SCR_InventoryOpenedStorageUI.c:1
SCR_InventoryMenuUI
Definition: SCR_InventoryMenuUI.c:247
GetInputManager
protected InputManager GetInputManager()
Definition: SCR_BaseManualCameraComponent.c:65
SCR_Matrix
Definition: SCR_Matrix.c:2
LoadoutAreaType
Definition: LoadoutAreaType.c:12
m_MenuHandler
SCR_DeployMenuBase m_MenuHandler
Main deploy menu with the map present.
m_Storage
BaseInventoryStorageComponent m_Storage
Definition: SCR_TourniquetStorageComponent.c:10