QTfrontend/gameuiconfig.cpp
changeset 87 ff213e443336
parent 85 44d9045b26ff
child 97 e7c1df9cce2c
--- a/QTfrontend/gameuiconfig.cpp	Tue Jul 25 20:19:46 2006 +0000
+++ b/QTfrontend/gameuiconfig.cpp	Wed Jul 26 12:25:48 2006 +0000
@@ -34,6 +34,8 @@
 #include <QMessageBox>
 #include <QTextStream>
 #include "gameuiconfig.h"
+#include "hwform.h"
+#include "pages.h"
 
 GameUIConfig::GameUIConfig(HWForm * FormWidgets)
 	: QObject()
@@ -67,19 +69,19 @@
 			if (str.startsWith(";")) continue;
 			if (str.startsWith("resolution "))
 			{
-				Form->ui.CBResolution->setCurrentIndex(str.mid(11).toLong());
+				Form->ui.pageOptions->CBResolution->setCurrentIndex(str.mid(11).toLong());
 			} else
 			if (str.startsWith("fullscreen "))
 			{
-				Form->ui.CBFullscreen->setChecked(str.mid(11).toLong());
+				Form->ui.pageOptions->CBFullscreen->setChecked(str.mid(11).toLong());
 			} else
 			if (str.startsWith("sound "))
 			{
-				Form->ui.CBEnableSound->setChecked(str.mid(6).toLong());
+				Form->ui.pageOptions->CBEnableSound->setChecked(str.mid(6).toLong());
 			} else
 			if (str.startsWith("nick "))
 			{
-				Form->ui.editNetNick->setText(str.mid(5));
+				Form->ui.pageOptions->editNetNick->setText(str.mid(5));
 			}
 		}
 		settings.close();
@@ -105,24 +107,24 @@
 	QTextStream stream(&settings);
 	stream.setCodec("UTF-8");
 	stream << "; Generated by Hedgewars, do not modify" << endl;
-	stream << "resolution " << Form->ui.CBResolution->currentIndex() << endl;
-	stream << "fullscreen " << Form->ui.CBFullscreen->isChecked() << endl;
-	stream << "sound " << Form->ui.CBEnableSound->isChecked() << endl;
-	stream << "nick " << Form->ui.editNetNick->text() << endl;
+	stream << "resolution " << Form->ui.pageOptions->CBResolution->currentIndex() << endl;
+	stream << "fullscreen " << Form->ui.pageOptions->CBFullscreen->isChecked() << endl;
+	stream << "sound " << Form->ui.pageOptions->CBEnableSound->isChecked() << endl;
+	stream << "nick " << Form->ui.pageOptions->editNetNick->text() << endl;
 	settings.close();
 }
 
 int GameUIConfig::vid_Resolution()
 {
-	return Form->ui.CBResolution->currentIndex();
+	return Form->ui.pageOptions->CBResolution->currentIndex();
 }
 
 bool GameUIConfig::vid_Fullscreen()
 {
-	return Form->ui.CBFullscreen->isChecked();
+	return Form->ui.pageOptions->CBFullscreen->isChecked();
 }
 
 bool GameUIConfig::isSoundEnabled()
 {
-	return Form->ui.CBEnableSound->isChecked();
+	return Form->ui.pageOptions->CBEnableSound->isChecked();
 }