Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/pickup/PickupInventory.h @ 3300

Last change on this file since 3300 was 3196, checked in by rgrieder, 15 years ago

Merged pch branch back to trunk.

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