Changeset 5388 in orxonox.OLD for trunk/src/lib/gui/gl_gui
- Timestamp:
- Oct 16, 2005, 2:05:26 AM (19 years ago)
- Location:
- trunk/src/lib/gui/gl_gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl_gui/glgui_handler.cc
r5366 r5388 17 17 18 18 #include "glgui_handler.h" 19 #include "event_handler.h" 19 20 20 21 using namespace std; … … 28 29 this->setName("GLGuiHandler"); 29 30 30 /* If you make a new class, what is most probably the case when you write this file31 don't forget to:32 1. Add the new file new_class.cc to the ./src/Makefile.am33 2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS34 !!!!!!!!!! IMPORTANT FOR SINGLETON !!!!!!!!!!!!!!!!35 3. SingleTon MUST be CL_NEW_CLASS = 0x00000fxx36 37 Advanced Topics:38 - if you want to let your object be managed via the ObjectManager make sure to read39 the object_manager.h header comments. You will use this most certanly only if you40 make many objects of your class, like a weapon bullet.41 */42 31 } 43 32 … … 54 43 GLGuiHandler::singletonRef = NULL; 55 44 } 45 46 void GLGuiHandler::activate() 47 { 48 // EventHandler::getInstance()->setState(ES_MENU); 49 50 } 51 52 void GLGuiHandler::deactivate() 53 { 54 55 } 56 57 58 void GLGuiHandler::process(const Event &event) 59 { 60 61 62 63 } -
trunk/src/lib/gui/gl_gui/glgui_handler.h
r5366 r5388 7 7 #define _GLGUI_HANDLER_H 8 8 9 #include " base_object.h"9 #include "event_listener.h" 10 10 11 11 // FORWARD DEFINITION 12 12 13 13 //! A default singleton class. 14 class GLGuiHandler : public BaseObject{14 class GLGuiHandler : public EventListener { 15 15 16 16 public: … … 19 19 inline static GLGuiHandler* getInstance(void) { if (!singletonRef) singletonRef = new GLGuiHandler(); return singletonRef; }; 20 20 21 void activate(); 22 void deactivate(); 23 24 25 virtual void process(const Event &event); 26 21 27 private: 22 28 GLGuiHandler(void); 23 29 static GLGuiHandler* singletonRef; 30 31 32 bool isActive; 24 33 }; 25 34
Note: See TracChangeset
for help on using the changeset viewer.