7 private CharacterVicinityComponent m_Vicinity;
14 BaseInventoryStorageComponent inventoryStorageComponent = GetCurrentNavigationStorage();
16 if (inventoryStorageComponent)
18 IEntity storageOwner = inventoryStorageComponent.GetOwner();
20 if (!storageOwner || !storageOwner.FindComponent(SCR_ArsenalInventoryStorageManagerComponent))
25 if (inventoryStorageComponent)
27 slotUI.SetArsenalResourceComponent(SCR_ResourceComponent.FindResourceComponent(inventoryStorageComponent.GetOwner()));
32 else if (WeaponAttachmentsStorageComponent.Cast(pComponent))
36 else if (SCR_ResourceComponent.FindResourceComponent(pComponent.GetOwner()))
40 else if (BaseInventoryStorageComponent.Cast( pComponent))
58 if ( m_workspaceWidget ==
null )
59 m_workspaceWidget =
GetGame().GetWorkspace();
62 m_InventoryManager = SCR_InventoryStorageManagerComponent.Cast( m_Character.FindComponent( SCR_InventoryStorageManagerComponent ) );
63 m_InventoryStorage = SCR_CharacterInventoryStorageComponent.Cast( m_Character.FindComponent( SCR_CharacterInventoryStorageComponent ) );
64 m_Vicinity = CharacterVicinityComponent.Cast( m_Character.FindComponent(CharacterVicinityComponent) );
65 m_wWidthOverride = SizeLayoutWidget.Cast(m_widget.FindWidget(
"TitleWidthOverride"));
68 m_wWidthOverride.SetWidthOverride(m_iMaxColumns * SLOT_LAYOUT_WIDTH);
70 if( m_InventoryStorage )
72 m_wGrid = GridLayoutWidget.Cast( m_widget.FindAnyWidget( m_sGridPath ) );
73 m_wStorageName = TextWidget.Cast( m_widget.FindAnyWidget(
"TextC" ) );
75 SizeLayoutWidget wSizeContainer = SizeLayoutWidget.Cast( m_widget.FindAnyWidget(
"SizeLayout0" ) );
77 wSizeContainer.SetAspectRatio( m_iMaxColumns / m_iMaxRows );
81 m_wStorageName.SetText(
"#AR-Inventory_Vicinity" );
87 override void HandlerAttached( Widget w )
89 super.HandlerAttached( w );
99 protected override void GetAllItems( out notnull array<IEntity> pItemsInStorage, BaseInventoryStorageComponent pStorage =
null )
105 super.GetAllItems(pItemsInStorage, pStorage);
107 m_Vicinity.GetAvailableItems(pItemsInStorage);
112 BaseInventoryStorageComponent storage,
116 array<BaseInventoryStorageComponent> aTraverseStorage =
null,
122 m_iMaxColumns = cols;
123 m_iMatrix =
new SCR_Matrix( m_iMaxColumns, m_iMaxRows );
124 SetSlotAreaType( slotID );
125 m_Character = character;