Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/Dialog_HS17/src/modules/dialog/DialogManager.h @ 11579

Last change on this file since 11579 was 11579, checked in by kuchlert, 6 years ago

some bug fixed most not

File size: 1.9 KB
Line 
1/*
2#ifndef _DialogManager_H__
3#define _DialogManager_H__
4
5#include "core/CoreIncludes.h"
6#include "core/LuaState.h"
7#include "core/GUIManager.h"
8#include "core/class/Identifier.h"
9#include "core/singleton/ScopedSingletonIncludes.h"
10#include "network/Host.h"
11#include "network/NetworkFunctionIncludes.h"
12#include "util/Singleton.h"
13#include <string>
14#include <vector>
15#include "core/config/Configurable.h"
16#include "core/XMLPort.h"
17#include "core/EventIncludes.h"
18#include "Dialog.h"
19
20
21
22
23
24namespace orxonox //tolua_export
25
26{//tolua_export
27        class _OrxonoxExport DialogManager //tolua_export
28        : public Singleton<DialogManager>
29        {//tolua_export
30                friend class Singleton<DialogManager>;
31       
32                public:
33               
34                DialogManager();
35               
36
37                static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); } //tolua_export
38               
39
40                void setDialog(Dialog* dialog); //tolua_export  // the triggered dialog sets it self so the lua can get to it.
41                const Dialog& getCurrentDialog();       //tolua_export
42                bool empty(); //tolua_export //returns true if no dialog is set.
43
44private:
45        Dialog* currentTalk_; //Dialog which is currently set.
46        static DialogManager* singletonPtr_s;
47
48        };//tolua_export
49}//tolua_export
50#endif
51 */
52
53#ifndef _DialogManager_H__
54#define _DialogManager_H__
55
56#include "util/Singleton.h"
57#include "core/object/Listable.h"
58#include "Dialog.h"
59
60namespace orxonox
61{
62    class DialogManager : public Singleton<DialogManager>, public Listable
63    {
64        friend class Singleton<DialogManager>;
65
66        public:
67            DialogManager();
68
69            int getValue() const
70                { return this->value_; }
71
72                static DialogManager& getInstance() { return Singleton<DialogManager>::getInstance(); }
73
74                void setDialog(Dialog* dialog);
75                const Dialog& getCurrentDialog();
76                 bool empty();
77
78        private:
79                Dialog* currentTalk_;
80            int value_;
81
82            static DialogManager* singletonPtr_s;
83    };
84}
85
86#endif /* _DialogManager_H__ */
Note: See TracBrowser for help on using the repository browser.