QTfrontend/pages.cpp
changeset 2747 7889a3a9724f
parent 2733 52a5a160566f
child 2752 df01bbbd0e1a
--- a/QTfrontend/pages.cpp	Thu Feb 04 18:46:49 2010 +0000
+++ b/QTfrontend/pages.cpp	Thu Feb 04 20:45:03 2010 +0000
@@ -155,7 +155,7 @@
 
 	}
 
-	randTeamButton = addButton("Random Team", GBHLayout, 9, false);
+	randTeamButton = addButton(QPushButton::tr("Random Team"), GBHLayout, 9, false);
 
 	vbox1->addWidget(GBoxHedgehogs);
 
@@ -184,6 +184,11 @@
 	CBGrave->setIconSize(QSize(32, 32));
 	GBTLayout->addWidget(CBGrave);
 
+	CBFlag = new QComboBox(GBoxTeam);
+	CBFlag->setMaxCount(65535);
+	CBFlag->setIconSize(QSize(22, 15));
+	GBTLayout->addWidget(CBFlag);
+
 	{
 		QHBoxLayout * hbox = new QHBoxLayout();
 		CBVoicepack = new QComboBox(GBoxTeam);
@@ -232,6 +237,16 @@
 		CBGrave->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
 	}
 
+	tmpdir.cd(datadir->absolutePath());
+	tmpdir.cd("Graphics/Flags");
+	list = tmpdir.entryList(QStringList("*.png"));
+	for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+	{
+		QPixmap pix(datadir->absolutePath() + "/Graphics/Flags/" + *it);
+		QIcon icon(pix.copy(0, 0, 22, 15));
+		CBFlag->addItem(icon, (*it).replace(QRegExp("^(.*)\\.png"), "\\1"));
+	}
+
 	vbox1->addStretch();
 	vbox2->addStretch();
 //	vbox3->addStretch();
@@ -388,6 +403,11 @@
             WeaponsName = new QComboBox(this);
             WeaponsLayout->addWidget(WeaponsName, 0, 0, 1, 2);
             WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 1, 1);
+
+            WeaponTooltip = new QCheckBox(this);
+            WeaponTooltip->setText(QCheckBox::tr("Show ammo menu tooltips"));
+            WeaponsLayout->addWidget(WeaponTooltip, 2, 0, 1, 2);
+
             gbTBLayout->addWidget(groupWeapons, 1, 0);
         }
 
@@ -1293,5 +1313,8 @@
 	BtnLAN = addButton(tr("LAN game"), pageLayout, 1, 2);
 	BtnOfficialServer = addButton(tr("Official server"), pageLayout, 2, 2);
 
+	// hack: temporary deactivated - requires server modifications that aren't backward compatible (yet)
+	BtnOfficialServer->setEnabled(false);
+
 	BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
 }