Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/pickups2/src/orxonox/objects/pickup/PickupInventory.h @ 3137

Last change on this file since 3137 was 3040, checked in by landauf, 16 years ago

added 2 typedefs in PickupCollection.cc to replace _Pairii which isn't supported by gcc.

  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
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
41namespace CEGUI { class Window; class WindowManager; class Image; }
42
43// tolua_begin
44namespace orxonox
45{
46// tolua_end
47    class _OrxonoxExport BaseItem;
48
49    /**
50        @brief Static class for the inventory GUI window.
51        @author Daniel 'Huty' Haggenmueller
52    */ 
53// tolua_begin
54    class _OrxonoxExport PickupInventory
55    {
56// tolua_end
57    public:
58        PickupInventory();
59        virtual ~PickupInventory();
60
61        static PickupInventory* getSingleton(); // tolua_export
62
63        static void toggleInventory(); // tolua_export
64
65        static unsigned int getEquipmentCount(); // tolua_export
66        static unsigned int getUsableCount(); // tolua_export
67        static unsigned int getPassiveCount(); // tolua_export
68
69        static unsigned int getCurrentUsableIndex(); // tolua_export
70        static bool isCurrentUsable(const BaseItem* item); // tolua_export
71        static void selectUsable(unsigned int i); // tolua_export
72
73        static BaseItem* getEquipmentItem(unsigned int i); // tolua_export
74        static BaseItem* getUsableItem(unsigned int i); // tolua_export
75        static BaseItem* getPassiveItem(unsigned int i); // tolua_export
76
77        static std::string getImageForItem(const BaseItem* item); // tolua_export
78
79        void clearInventory(CEGUI::WindowManager* winMgr, CEGUI::Window* equipPane, CEGUI::Window* usablePane); // tolua_export
80        void updateTabs(CEGUI::WindowManager* winMgr, CEGUI::Window* equipWindow, CEGUI::Window* usableWindow); // tolua_export
81
82        void updateEquipment(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
83        void updateUsable(CEGUI::WindowManager* winMgr, CEGUI::Window* target);
84
85        static void createItemWindows(CEGUI::WindowManager* winMgr, const std::string& id, int x, int y);
86        static void setWindowProperties(CEGUI::WindowManager* winMgr, CEGUI::Window* target, const std::string& id, const BaseItem* item, const std::string& textColour);
87
88        const bool isVisible() const
89            { return this->bInventoryVisible_; }
90        void setVisible(bool visible)
91            { this->bInventoryVisible_ = visible; }
92    private:
93        bool bInventoryVisible_;
94        unsigned int createdEquipmentWindows_;
95        unsigned int createdUsableWindows_;
96        unsigned int visibleEquipmentWindows_;
97        unsigned int visibleUsableWIndows_;
98
99        static PickupInventory* pickupInventory_s;
100    }; // tolua_export
101} // tolua_export
102
103#endif /* _PickupInventory_H__ */
Note: See TracBrowser for help on using the repository browser.