Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_InventorySlotStorageUI.c
Go to the documentation of this file.
1 
2 //------------------------------------------------------------------------------------------------
6 {
7  protected Widget m_wShownIcon;
8 
9  //------------------------------------------------------------------------ USER METHODS ------------------------------------------------------------------------
10 
11  //------------------------------------------------------------------------------------------------
13  override void SetSlotVisible( bool bVisible )
14  {
15  super.SetSlotVisible( bVisible );
16  if ( bVisible )
17  m_wShownIcon = Widget.Cast( m_widget.FindAnyWidget( "SelectedFrame" ) );
18  else
19  m_wShownIcon = null;
20  }
21 
22 
23  //------------------------------------------------------------------------------------------------
24  void ToggleShownIconVisible()
25  {
26  if ( !m_wShownIcon )
27  return;
28  m_wShownIcon.SetVisible( !m_wShownIcon.IsVisible() );
29  }
30 
31  //------------------------------------------------------------------------------------------------
32  override bool RemoveItem()
33  {
34  //try to delete the UI slot
35  if( super.RemoveItem() )
36  return true;
37  return true;
38  }
39 
40  //------------------------------------------------------------------------------------------------
41  /*
42  override void Init()
43  {
44  if(! m_Attributes )
45  return;
46  //normally the storages might be larger than 1x1 (shown in a storage), but the storages list is 1x1
47  m_iSizeX = 1;
48  m_iSizeY = 1;
49  //and create the visual slot
50  m_widget = GetGame().GetWorkspace().CreateWidgets( SLOT_LAYOUT_1x1, m_pStorageUI.GetStorageGrid() );
51 
52  m_widget.AddHandler( this ); //calls the HandlerAttached()
53  }
54  */
55 
56  //------------------------------------------------------------------------------------------------
58  override void SetItemFunctionality()
59  {
60  m_eSlotFunction = ESlotFunction.TYPE_STORAGE;
61  }
62 
63  //------------------------------------------------------------------------------------------------
64  override void SetSelected( bool select )
65  {
66  //TODO: show the selected effect should be done as a component
67  m_bSelected = select;
68  if ( !m_wSelectedEffect )
69  return;
70  if ( select )
71  m_wSelectedEffect.SetVisible( true );
72  else
73  m_wSelectedEffect.SetVisible( false );
74  }
75 
76  //------------------------------------------------------------------------------------------------
77 
78  //------------------------------------------------------------------------ COMMON METHODS ----------------------------------------------------------------------
79 
80 
81  //------------------------------------------------------------------------------------------------
82  void SCR_InventorySlotStorageUI( InventoryItemComponent pComponent = null, SCR_InventoryStorageBaseUI pStorageUI = null, bool bVisible = true, int iSlotIndex = -1, SCR_ItemAttributeCollection pAttributes = null )
83  {
84  m_pStorageUI = SCR_InventoryStoragesListUI.Cast( pStorageUI );
85  }
86 
87 
88  //------------------------------------------------------------------------------------------------
90  {
91  }
92 };
SCR_InventoryStorageBaseUI
Definition: SCR_InventoryStorageBaseUI.c:6
InventoryItemComponent
Definition: InventoryItemComponent.c:12
SCR_ItemAttributeCollection
Definition: SCR_ItemAttributeCollection.c:2
SCR_InventorySlotStorageUI
Definition: SCR_InventorySlotStorageUI.c:5
m_bSelected
protected bool m_bSelected
Definition: SCR_InventoryHitZonePointUI.c:396
ESlotFunction
ESlotFunction
Definition: SCR_InventorySlotUI.c:12
SCR_InventoryStoragesListUI
Definition: SCR_InventoryStoragesListUI.c:6
SCR_InventorySlotUI
Definition: SCR_InventorySlotUI.c:27