00001 #include "levelwindow.h" 00002 #include "levelwindowgui.h" 00003 #include "mainmenu.h" 00004 #include "mwindow.h" 00005 00006 LevelWindow::LevelWindow(MWindow *mwindow) 00007 : Thread() 00008 { 00009 this->mwindow = mwindow; 00010 Thread::set_synchronous(1); 00011 } 00012 00013 LevelWindow::~LevelWindow() 00014 { 00015 if(gui) 00016 { 00017 gui->set_done(0); 00018 join(); 00019 } 00020 if(gui) delete gui; 00021 } 00022 00023 int LevelWindow::create_objects() 00024 { 00025 gui = new LevelWindowGUI(mwindow, this); 00026 gui->create_objects(); 00027 return 0; 00028 } 00029 00030 00031 void LevelWindow::run() 00032 { 00033 if(gui) gui->run_window(); 00034 }
1.4.4