1 | /* |
---|
2 | * ORXONOX - the hottest 3D action shooter ever to exist |
---|
3 | * > www.orxonox.net < |
---|
4 | * |
---|
5 | * |
---|
6 | * License notice: |
---|
7 | * |
---|
8 | * This program is free software; you can redistribute it and/or |
---|
9 | * modify it under the terms of the GNU General Public License |
---|
10 | * as published by the Free Software Foundation; either version 2 |
---|
11 | * of the License, or (at your option) any later version. |
---|
12 | * |
---|
13 | * This program is distributed in the hope that it will be useful, |
---|
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | * GNU General Public License for more details. |
---|
17 | * |
---|
18 | * You should have received a copy of the GNU General Public License |
---|
19 | * along with this program; if not, write to the Free Software |
---|
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
---|
21 | * |
---|
22 | * Author: |
---|
23 | * Daniel 'Huty' Haggenmueller |
---|
24 | * Co-authors: |
---|
25 | * ... |
---|
26 | * |
---|
27 | */ |
---|
28 | |
---|
29 | /** |
---|
30 | @file |
---|
31 | @brief Declaration of static class for the inventory GUI window. |
---|
32 | */ |
---|
33 | |
---|
34 | #ifndef _PickupInventory_H__ |
---|
35 | #define _PickupInventory_H__ |
---|
36 | |
---|
37 | #include "OrxonoxPrereqs.h" |
---|
38 | |
---|
39 | #include "core/BaseObject.h" |
---|
40 | |
---|
41 | namespace CEGUI { class Window; class WindowManager; class Image; } |
---|
42 | |
---|
43 | // tolua_begin |
---|
44 | namespace orxonox |
---|
45 | { |
---|
46 | // tolua_end |
---|
47 | /** |
---|
48 | @brief Static class for the inventory GUI window. |
---|
49 | @author Daniel 'Huty' Haggenmueller |
---|
50 | */ |
---|
51 | // tolua_begin |
---|
52 | class _OrxonoxExport PickupInventory |
---|
53 | { |
---|
54 | // tolua_end |
---|
55 | public: |
---|
56 | PickupInventory(); |
---|
57 | virtual ~PickupInventory(); |
---|
58 | |
---|
59 | static PickupInventory* getSingleton(); // tolua_export |
---|
60 | |
---|
61 | static void toggleInventory(); // tolua_export |
---|
62 | |
---|
63 | static unsigned int getEquipmentCount(); // tolua_export |
---|
64 | static unsigned int getUsableCount(); // tolua_export |
---|
65 | static unsigned int getPassiveCount(); // tolua_export |
---|
66 | |
---|
67 | static unsigned int getCurrentUsableIndex(); // tolua_export |
---|
68 | static bool isCurrentUsable(const BaseItem* item); // tolua_export |
---|
69 | static void selectUsable(unsigned int i); // tolua_export |
---|
70 | |
---|
71 | static BaseItem* getEquipmentItem(unsigned int i); // tolua_export |
---|
72 | static BaseItem* getUsableItem(unsigned int i); // tolua_export |
---|
73 | static BaseItem* getPassiveItem(unsigned int i); // tolua_export |
---|
74 | |
---|
75 | static std::string getImageForItem(const BaseItem* item); // tolua_export |
---|
76 | |
---|
77 | void clearInventory(CEGUI::WindowManager* winMgr, CEGUI::Window* equipPane, CEGUI::Window* usablePane); // tolua_export |
---|
78 | void updateTabs(CEGUI::WindowManager* winMgr, CEGUI::Window* equipWindow, CEGUI::Window* usableWindow); // tolua_export |
---|
79 | |
---|
80 | void updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target); |
---|
81 | void updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target); |
---|
82 | |
---|
83 | static void createItemWindows(CEGUI::WindowManager* winMgr, const std::string& id, int x, int y); |
---|
84 | static void setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour); |
---|
85 | |
---|
86 | const bool isVisible() const |
---|
87 | { return this->bInventoryVisible_; } |
---|
88 | void setVisible(bool visible) |
---|
89 | { this->bInventoryVisible_ = visible; } |
---|
90 | private: |
---|
91 | bool bInventoryVisible_; |
---|
92 | unsigned int createdEquipmentWindows_; |
---|
93 | unsigned int createdUsableWindows_; |
---|
94 | unsigned int visibleEquipmentWindows_; |
---|
95 | unsigned int visibleUsableWIndows_; |
---|
96 | |
---|
97 | static PickupInventory* pickupInventory_s; |
---|
98 | }; // tolua_export |
---|
99 | } // tolua_export |
---|
100 | |
---|
101 | #endif /* _PickupInventory_H__ */ |
---|