1 | #include "DialogManager.h" |
---|
2 | #include "core/CoreIncludes.h" |
---|
3 | #include "core/singleton/ScopedSingletonIncludes.h" |
---|
4 | |
---|
5 | namespace orxonox |
---|
6 | { |
---|
7 | ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); |
---|
8 | |
---|
9 | RegisterAbstractClass(DialogManager).inheritsFrom<Listable>(); |
---|
10 | |
---|
11 | DialogManager::DialogManager() |
---|
12 | { |
---|
13 | RegisterObject(DialogManager); |
---|
14 | |
---|
15 | this->currentTalk_ = NULL; |
---|
16 | } |
---|
17 | |
---|
18 | void DialogManager::setDialog(Dialog* dialog) |
---|
19 | { |
---|
20 | this->currentTalk_ = dialog; |
---|
21 | } |
---|
22 | |
---|
23 | const Dialog* DialogManager::getCurrentDialog() |
---|
24 | { |
---|
25 | return this->currentTalk_; |
---|
26 | } |
---|
27 | |
---|
28 | bool DialogManager::empty() |
---|
29 | { |
---|
30 | if(this->currentTalk_ == NULL) |
---|
31 | { |
---|
32 | return true; |
---|
33 | } |
---|
34 | else |
---|
35 | { |
---|
36 | return false; |
---|
37 | } |
---|
38 | } |
---|
39 | } |
---|
40 | /*#include "core/CoreIncludes.h" |
---|
41 | #include "core/LuaState.h" |
---|
42 | #include "core/GUIManager.h" |
---|
43 | #include "core/class/Identifier.h" |
---|
44 | #include "core/singleton/ScopedSingletonIncludes.h" |
---|
45 | #include "network/Host.h" |
---|
46 | #include "network/NetworkFunctionIncludes.h" |
---|
47 | #include "DialogManager.h" |
---|
48 | #include <vector> |
---|
49 | #include <string> |
---|
50 | #include "core/XMLPort.h" |
---|
51 | #include "Dialog.h" |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | namespace orxonox { |
---|
56 | |
---|
57 | ManageScopedSingleton(DialogManager, ScopeID::ROOT, false); |
---|
58 | |
---|
59 | |
---|
60 | DialogManager::DialogManager() |
---|
61 | { |
---|
62 | this->currentTalk_ = NULL; |
---|
63 | } |
---|
64 | |
---|
65 | void DialogManager::setDialog(Dialog* dialog) |
---|
66 | { |
---|
67 | this->currentTalk_ = dialog; |
---|
68 | } |
---|
69 | |
---|
70 | const Dialog& getCurrentDialog() |
---|
71 | { |
---|
72 | return this->currentTalk_; |
---|
73 | } |
---|
74 | |
---|
75 | bool DialogManager::empty() |
---|
76 | { |
---|
77 | if(this->currentTalk_ == NULL) |
---|
78 | { |
---|
79 | return true; |
---|
80 | } |
---|
81 | else |
---|
82 | { |
---|
83 | return false; |
---|
84 | } |
---|
85 | } |
---|
86 | } */ |
---|