Changeset 4317 in orxonox.OLD for orxonox/branches/physics/src
- Timestamp:
- May 27, 2005, 12:44:55 AM (20 years ago)
- Location:
- orxonox/branches/physics/src/subprojects/particles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/subprojects/particles/framework.cc
r4316 r4317 294 294 } 295 295 296 Framework* Framework::singletonRef = NULL; 297 298 Framework* Framework::getInstance(void) 299 { 300 if (Framework::singletonRef == NULL) 301 Framework::singletonRef = new Framework(); 302 return Framework::singletonRef; 303 } 296 304 297 305 Framework::Framework() … … 358 366 359 367 guiMainWindow = new Window("ParticlesFUN"); 360 368 { 369 Box* windowBox = new Box('v'); 370 { 371 Button* quitButton = new Button("quit"); 372 windowBox->fill(quitButton); 373 } 374 guiMainWindow->fill(windowBox); 375 } 361 376 Window::mainWindow->showall(); 362 377 mainloopGUI(); … … 370 385 pthread_t guiThread; 371 386 372 Framework* framework = new Framework();387 Framework* framework = Framework::getInstance(); 373 388 374 389 pthread_create(&guiThread, NULL, Framework::initGui,(void*) argv); -
orxonox/branches/physics/src/subprojects/particles/framework.h
r4316 r4317 13 13 class Framework { 14 14 private: 15 Framework(); 16 static Framework* singletonRef; 17 15 18 Camera* camera; 16 19 20 17 21 int movement [4]; 18 22 … … 24 28 25 29 public: 26 Framework();27 30 ~Framework(); 28 31 32 static Framework* getInstance(void); 33 29 34 void initModule(); 30 35 bool mainLoop();
Note: See TracChangeset
for help on using the changeset viewer.