Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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);
12 SortSlots();
13 ShowPage(0);
14
15 if (m_Storage.GetOwner().FindComponent(BaseWeaponComponent))
16 m_wProgressBar.SetVisible(false);
17 }
18
19 protected override int CreateSlots()
20 {
21 array<IEntity> pItemsInStorage = {};
22 GetAllItems(pItemsInStorage, GetCurrentNavigationStorage());
23 UpdateOwnedSlots(pItemsInStorage);
24 return 0;
25 }
26
27 protected override void GetAllItems(out notnull array<IEntity> pItemsInStorage, BaseInventoryStorageComponent pStorage = null)
28 {
29 super.GetAllItems(pItemsInStorage, pStorage);
30 }
31
33 {
34 m_wCloseStorageButton = ButtonWidget.Cast(m_widget.FindAnyWidget("CloseStorageBtn"));
36 {
37 m_wCloseStorageButton.SetVisible(true);
39 if (nav)
40 {
41 if (GetGame().GetInputManager().GetLastUsedInputDevice() == EInputDeviceType.GAMEPAD)
42 nav.EnableCloseWithGamepad(false);
43 nav.m_OnActivated.Insert(CloseStorage);
44 }
45 }
46
48 }
49
51 {
52 m_MenuHandler.RemoveOpenStorage(this);
53 }
54
56 {
57 return m_bFromVicinity;
58 }
59
61 BaseInventoryStorageComponent storage,
62 LoadoutAreaType slotID = null,
63 SCR_InventoryMenuUI menuManager = null,
64 int iPage = 0,
65 array<BaseInventoryStorageComponent> aTraverseStorage = null,
66 int cols = 6,
67 int rows = 3,
68 bool fromVicinity = false)
69 {
70 m_Storage = storage;
71 m_iMaxRows = rows;
72 m_iMaxColumns = cols;
73 m_bFromVicinity = fromVicinity;
75 if (aTraverseStorage)
76 m_aTraverseStorage.Copy(aTraverseStorage);
77 SetSlotAreaType(slotID);
78 }
79};
ArmaReforgerScripted GetGame()
Definition game.c:1398
InputManager GetInputManager()
Interactive non-focus button showing hint, and triggering actions.
void SCR_InventoryOpenedStorageUI(BaseInventoryStorageComponent storage, LoadoutAreaType slotID=null, SCR_InventoryMenuUI menuManager=null, int iPage=0, array< BaseInventoryStorageComponent > aTraverseStorage=null, int cols=6, int rows=3, bool fromVicinity=false)
override void GetAllItems(out notnull array< IEntity > pItemsInStorage, BaseInventoryStorageComponent pStorage=null)
void ShowPage(int iPage, out int slotToFocus=-1)
ref array< BaseInventoryStorageComponent > m_aTraverseStorage
void CreateEmptyLayout(bool recreate=false)
void SCR_InventoryStorageBaseUI(BaseInventoryStorageComponent storage, LoadoutAreaType slotID=null, SCR_InventoryMenuUI menuManager=null, int iPage=0, array< BaseInventoryStorageComponent > aTraverseStorage=null)
void UpdateOwnedSlots(notnull array< IEntity > pItemsInStorage)
BaseInventoryStorageComponent m_Storage
void SetSlotAreaType(LoadoutAreaType eSlotType)