Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/questsystem/QuestGUI.h @ 6752

Last change on this file since 6752 was 6417, checked in by rgrieder, 15 years ago

Merged presentation2 branch back to trunk.
Major new features:

  • Actual GUI with settings, etc.
  • Improved space ship steering (human interaction)
  • Rocket fire and more particle effects
  • Advanced sound framework
  • Property svn:eol-style set to native
File size: 3.4 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 *      Damian 'Mozork' Frick
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30    @file
31    @brief Definition of the QuestGIU class.
32*/
33
34#ifndef _QuestGUI_H__
35#define _QuestGUI_H__
36
37#include "questsystem/QuestsystemPrereqs.h"
38
39#include <list>
40#include <map>
41#include <string>
42#include <CEGUIForwardRefs.h>
43
44#include "core/OrxonoxClass.h"
45
46namespace orxonox {
47
48    /**
49    @brief
50        Handles the GUI for the Questsystem.
51    @author
52        Damian 'Mozork' Frick
53    */
54    class _QuestsystemExport QuestGUI : public OrxonoxClass
55    {
56
57        public:
58
59            QuestGUI(PlayerInfo* player);
60            virtual ~QuestGUI();
61
62            void update(void); //!< Update the GUI.
63            CEGUI::Window* getGUI(void); //!< Get the root CEGUI Window of the GUI.
64
65            CEGUI::Window* getWindow(void); //!< Get a CEGUI Window to use.
66            void giveWindow(CEGUI::Window* window); //!< Return a no longer needed CEGUI Window for reuse.
67
68            static QuestGUINode* findNode(CEGUI::Window* window); //!< Finde the QuestGUINode belonging to the input CEGUI Window.
69
70            /**
71            @brief Retreive the CEGUI WindowManager.
72            @return Returns the CEGUI WindoWManager.
73            */
74            inline CEGUI::WindowManager* getWindowManager(void)
75                { return this->windowManager_; }
76            /**
77            @brief Retrieve the root window.
78            @return Returns the root window.
79            */
80            inline CEGUI::Window* getRootWindow(void)
81                { return this->rootWindow_; }
82            /**
83            @brief Retreive the player.
84            @return Returns the player.
85            */
86            inline PlayerInfo* getPlayer(void)
87                { return this->player_; }
88
89        private:
90
91            int createNode(QuestGUINode* parent, QuestItem* item, int depth, int index); //!< Recursive method to create Nodes for all Quests an Hints the given Quest is a parent to.
92
93            void clear(void); //!< Clear the QuestGUI.
94
95            QuestGUINode* root_; //!< An empty QuestGUINode being the parent of all otherwise parent-less nodes.
96
97            CEGUI::WindowManager* windowManager_; //!< The CEGUI WindowManager.
98            CEGUI::Window* rootWindow_; //!< The root CEGUI Window of the GUI.
99            PlayerInfo* player_; //!< The player that owns the GUI.
100
101            std::map<CEGUI::Window*, QuestGUINode*> nodes_; //!< A list of all QuestGUINodes, ordered by their respective CEGUI Windows.
102            std::list<CEGUI::Window*> windows_; //!< A list of windows to be used.
103
104    };
105
106}
107
108#endif /* _QuestGUI_H__ */
109
Note: See TracBrowser for help on using the repository browser.