1 /////////////////////////////////////////////////////////////////////////////// 2 // Copyright (C) 2004-2011 by The Allacrost Project 3 // Copyright (C) 2012-2016 by Bertram (Valyria Tear) 4 // All Rights Reserved 5 // 6 // This code is licensed under the GNU GPL version 2. It is free software 7 // and you may modify it and/or redistribute it under the terms of this license. 8 // See https://www.gnu.org/copyleft/gpl.html for details. 9 /////////////////////////////////////////////////////////////////////////////// 10 11 #ifndef __MENU_INVENTORY_STATE_HEADER__ 12 #define __MENU_INVENTORY_STATE_HEADER__ 13 14 #include "modes/menu/menu_states/menu_abstract_state.h" 15 16 namespace vt_menu 17 { 18 19 class MenuMode; 20 21 namespace private_menu 22 { 23 24 /** 25 *** \brief Inventory State. Handles user interactions for item use and equiping 26 **/ 27 class InventoryState : virtual public AbstractMenuState { 28 public: 29 //! \brief the possible inventory options 30 enum INVENTORY_CATEGORY { 31 INV_OPTIONS_USE, 32 INV_OPTIONS_EQUIP, 33 INV_OPTIONS_REMOVE, 34 INV_OPTIONS_BACK, 35 INV_OPTIONS_SIZE 36 }; 37 38 //! \brief InventoryState state constructor InventoryState(MenuMode * menu_mode)39 explicit InventoryState(MenuMode* menu_mode): 40 AbstractMenuState("Inventory State", menu_mode) 41 {} 42 ~InventoryState()43 ~InventoryState() 44 {} 45 46 void Reset(); 47 48 AbstractMenuState *GetTransitionState(uint32_t selection); 49 50 protected: 51 void _OnDrawMainWindow(); 52 53 void _ActiveWindowUpdate(); 54 55 bool _IsActive(); 56 }; 57 58 } // namespace private_menu 59 60 } // namespace vt_menu 61 62 #endif // __MENU_INVENTORY_STATE_HEADER__ 63