Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ingamemenu/src/orxonox/pickup/PickupInventory.h @ 6020

Last change on this file since 6020 was 5781, checked in by rgrieder, 15 years ago

Reverted trunk again. We might want to find a way to delete these revisions again (x3n's changes are still available as diff in the commit mails).

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