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