QTfrontend/hwform.cpp
changeset 1225 f882a92ef872
parent 1223 41d7283934c1
child 1235 070629f3902d
--- a/QTfrontend/hwform.cpp	Sat Aug 16 20:15:27 2008 +0000
+++ b/QTfrontend/hwform.cpp	Sat Aug 16 20:36:18 2008 +0000
@@ -49,13 +49,14 @@
   : QMainWindow(parent), pnetserver(0), pRegisterServer(0), editedTeam(0), hwnet(0)
 {
 	ui.setupUi(this);
+
+	ui.pageOptions->CBResolution->addItems(sdli.getResolutions());
+
 	config = new GameUIConfig(this, cfgdir->absolutePath() + "/hedgewars.ini");
 
 	UpdateTeamsLists();
 	UpdateWeapons();
 
-	StartMusic();
-
 	connect(config, SIGNAL(frontendFullscreen(bool)), this, SLOT(onFrontendFullscreen(bool)));
 	onFrontendFullscreen(config->isFrontendFullscreen());
 
@@ -130,6 +131,8 @@
 		this, SLOT(GoBack())); // executed third
 
 	GoToPage(ID_PAGE_MAIN);
+
+	sdli.StartMusic();
 }
 
 void HWForm::onFrontendFullscreen(bool value)
@@ -546,7 +549,7 @@
 {
 	switch(gameState) {
 		case gsStarted: {
-			StopMusic();
+			sdli.StopMusic();
 			GoToPage(ID_PAGE_INGAME);
 			ui.pageGameStats->labelGameStats->setText("");
 			if (pRegisterServer)
@@ -558,13 +561,16 @@
 		}
 		case gsFinished: {
 			GoBack();
-			StartMusic();
+			sdli.StartMusic();
 			GoToPage(ID_PAGE_GAMESTATS);
 			break;
 		}
 		default: {
 			quint8 id = ui.Pages->currentIndex();
-			if (id == ID_PAGE_INGAME) GoBack();
+			if (id == ID_PAGE_INGAME) {
+				GoBack();
+				sdli.StartMusic();
+			}
 		};
 	}
 
@@ -682,13 +688,3 @@
 	config->SaveOptions();
 	event->accept();
 }
-
-void HWForm::StartMusic()
-{
-
-}
-
-void HWForm::StopMusic()
-{
-
-}