Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_InventoryButtonPageUI.c
Go to the documentation of this file.
8
9
10//------------------------------------------------------------------------------------------------
14{
15
19 protected Widget m_widget;
20 //------------------------------------------------------------------------ USER METHODS ------------------------------------------------------------------------
21
22 //------------------------------------------------------------------------------------------------
23
24 //------------------------------------------------------------------------ COMMON METHODS ----------------------------------------------------------------------
25
26 //------------------------------------------------------------------------------------------------
27 override bool OnClick(Widget w, int x, int y, int button)
28 {
29 switch ( m_EButtonType )
30 {
31 case EInventoryButton.BUTTON_PAGE_PREV:
32 {
33 if ( m_pStorageUI )
34 m_pStorageUI.Action_PrevPage();
35 } break;
36 case EInventoryButton.BUTTON_PAGE_NEXT:
37 {
38 if ( m_pStorageUI )
39 m_pStorageUI.Action_NextPage();
40 } break;
41
42 case EInventoryButton.BUTTON_TRAVERSE_BACK:
43 {
44 if ( !m_pStorageUI )
45 return false;
46 if ( !m_pMenuHandler )
47 return false;
48 // m_pMenuHandler.SetActiveStorage( m_pStorageUI );
49 m_pMenuHandler.Action_StepBack();
50 } break;
51
52 /*case EInventoryButton.BUTTON_SHOW_DEFAULT:
53 {
54 if ( m_pMenuHandler )
55 m_pMenuHandler.ShowDefault( );
56 } break;*/
57
58 }
59 return true;
60 }
61
62 //------------------------------------------------------------------------------------------------
63 override bool OnFocus(Widget w, int x, int y)
64 {
65 return false;
66 }
67
68 //------------------------------------------------------------------------------------------------
69 override bool OnFocusLost(Widget w, int x, int y)
70 {
71 return false;
72 }
73
74 //------------------------------------------------------------------------------------------------
75 override bool OnChange(Widget w, bool finished)
76 {
77 }
78
79 //------------------------------------------------------------------------------------------------
80 override void HandlerAttached( Widget w )
81 {
82 m_widget = w;
83 }
84
85 //------------------------------------------------------------------------------------------------
86 void SCR_InventoryButton( EInventoryButton EButtonType, SCR_InventoryMenuUI pMenuHandler = null, SCR_InventoryStorageBaseUI pStorageUI = null )
87 {
88 m_pStorageUI = pStorageUI;
89 m_pMenuHandler = pMenuHandler;
90 //store the item into the slot
91 m_EButtonType = EButtonType;
92 }
93
94
95 //------------------------------------------------------------------------------------------------
97 {
98 }
99};
@ BUTTON_TRAVERSE_BACK
@ BUTTON_SHOW_DEFAULT
SCR_InventoryMenuUI m_pMenuHandler
override void HandlerAttached(Widget w)
override bool OnFocusLost(Widget w, int x, int y)
override bool OnFocus(Widget w, int x, int y)
SCR_InventoryStorageBaseUI m_pStorageUI
override bool OnChange(Widget w, bool finished)
override bool OnClick(Widget w, int x, int y, int button)
void SCR_InventoryButton(EInventoryButton EButtonType, SCR_InventoryMenuUI pMenuHandler=null, SCR_InventoryStorageBaseUI pStorageUI=null)