Changeset 3370 for code/trunk/src/orxonox/overlays/console
- Timestamp:
- Jul 30, 2009, 2:10:44 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource (added) merged: 3328,3336-3340,3342-3350,3352-3366
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/overlays/console/InGameConsole.cc
r3327 r3370 60 60 SetConsoleCommand(InGameConsole, closeConsole, true); 61 61 62 InGameConsole* InGameConsole::singleton Ref_s = 0;62 InGameConsole* InGameConsole::singletonPtr_s = 0; 63 63 64 64 /** … … 76 76 RegisterObject(InGameConsole); 77 77 78 assert(singletonRef_s == 0);79 singletonRef_s = this;80 81 78 this->bActive_ = false; 82 79 this->cursor_ = 0.0f; … … 131 128 if (this->consoleOverlay_) 132 129 Ogre::OverlayManager::getSingleton().destroy(consoleOverlay_); 133 134 singletonRef_s = 0;135 130 } 136 131 -
code/trunk/src/orxonox/overlays/console/InGameConsole.h
r3327 r3370 34 34 35 35 #include <string> 36 36 37 #include "util/OgreForwardRefs.h" 38 #include "util/Singleton.h" 37 39 #include "core/Shell.h" 38 40 #include "core/WindowEventListener.h" … … 40 42 namespace orxonox 41 43 { 42 class _OrxonoxExport InGameConsole : public S hellListener, public WindowEventListener44 class _OrxonoxExport InGameConsole : public Singleton<InGameConsole>, public ShellListener, public WindowEventListener 43 45 { 46 friend class Singleton<InGameConsole>; 44 47 public: // functions 45 48 InGameConsole(); … … 51 54 52 55 void update(const Clock& time); 53 54 static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }55 static InGameConsole* getInstancePtr() { return singletonRef_s; }56 56 57 57 static void openConsole(); … … 112 112 bool bHidesAllInput_; 113 113 114 static InGameConsole* singleton Ref_s;114 static InGameConsole* singletonPtr_s; 115 115 }; 116 116 }
Note: See TracChangeset
for help on using the changeset viewer.