QTfrontend/hwform.cpp
changeset 50 9ab4067dabec
parent 45 1072e7fe85c8
child 52 ae2950c5465c
--- a/QTfrontend/hwform.cpp	Sun Jan 15 14:14:12 2006 +0000
+++ b/QTfrontend/hwform.cpp	Sun Jan 15 23:31:34 2006 +0000
@@ -45,6 +45,7 @@
 #include "sdlkeys.h"
 #include "hwconsts.h"
 //#include "gamecmds.h"
+#include "teamselect.h"
 
 HWForm::HWForm(QWidget *parent)
 	: QMainWindow(parent)
@@ -125,7 +126,9 @@
 
 	for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
 	{
-		ui.CBTeamName->addItem((*it).replace(QRegExp("^(.*).cfg$"), "\\1"));
+	  QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1");
+	  m_teamNames.push_back(tmpTeamStr);
+	  ui.CBTeamName->addItem(tmpTeamStr);
 	}
 
 	QFile settings(cfgdir.absolutePath() + "/options");
@@ -192,6 +195,11 @@
 void HWForm::GoToSinglePlayer()
 {
 	ui.Pages->setCurrentIndex(ID_PAGE_SINGLEPLAYER);
+
+	TeamSelWidget* pts=new TeamSelWidget(m_teamNames, ui.Pages->widget(ID_PAGE_SINGLEPLAYER));
+
+	pts->resize(500, 350);
+	pts->show();
 }
 
 void HWForm::GoToSetup()