Frontend:
authorsmxx
Mon, 01 Feb 2010 22:01:35 +0000
changeset 2739 f860f27028cc
parent 2738 bfccb2ec4334
child 2740 03df0573a9fd
Frontend: + New edit buttons for game and weapon scheme selection
QTfrontend/gamecfgwidget.cpp
QTfrontend/hedgewars.qrc
QTfrontend/res/edit.png
--- a/QTfrontend/gamecfgwidget.cpp	Mon Feb 01 21:26:15 2010 +0000
+++ b/QTfrontend/gamecfgwidget.cpp	Mon Feb 01 22:01:35 2010 +0000
@@ -52,22 +52,29 @@
 
 	GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Game scheme"), GBoxOptions), 0, 0);
 
-
+	QPixmap pmEdit(":/res/edit.png");
+	
 	QPushButton * goToSchemePage = new QPushButton(GBoxOptions);
-	goToSchemePage->setText(tr("Edit schemes"));
-	GBoxOptionsLayout->addWidget(goToSchemePage, 1, 0, 1, 2);
+	//goToSchemePage->setText(tr("Edit schemes"));
+	goToSchemePage->setIconSize(pmEdit.size());
+	goToSchemePage->setIcon(pmEdit);
+	goToSchemePage->setMaximumWidth(pmEdit.width() + 6);
+	GBoxOptionsLayout->addWidget(goToSchemePage, 0, 2);
 	connect(goToSchemePage, SIGNAL(clicked()), this, SIGNAL(goToSchemes()));
 
-	GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 2, 0);
+	GBoxOptionsLayout->addWidget(new QLabel(QLabel::tr("Weapons"), GBoxOptions), 1, 0);
 
 	WeaponsName = new QComboBox(GBoxOptions);
-	GBoxOptionsLayout->addWidget(WeaponsName, 2, 1);
+	GBoxOptionsLayout->addWidget(WeaponsName, 1, 1);
 
 	connect(WeaponsName, SIGNAL(currentIndexChanged(int)), this, SLOT(ammoChanged(int)));
 
 	QPushButton * goToWeaponPage = new QPushButton(GBoxOptions);
-	goToWeaponPage->setText(tr("Edit weapons"));
-	GBoxOptionsLayout->addWidget(goToWeaponPage, 3, 0, 1, 2);
+	//goToWeaponPage->setText(tr("Edit weapons"));
+	goToWeaponPage->setIconSize(pmEdit.size());
+	goToWeaponPage->setIcon(pmEdit);
+	goToWeaponPage->setMaximumWidth(pmEdit.width() + 6);
+	GBoxOptionsLayout->addWidget(goToWeaponPage, 1, 2);
 
 	connect(goToWeaponPage, SIGNAL(clicked()), this, SLOT(jumpToWeapons()));
 
--- a/QTfrontend/hedgewars.qrc	Mon Feb 01 21:26:15 2010 +0000
+++ b/QTfrontend/hedgewars.qrc	Mon Feb 01 22:01:35 2010 +0000
@@ -30,6 +30,7 @@
     <file>res/NetworkPlay.png</file>
     <file>res/Settings.png</file>
     <file>res/dropdown.png</file>
+    <file>res/edit.png</file>
     <file>res/checked.png</file>
     <file>res/unchecked.png</file>
     <file>res/graphicsicon.png</file>
Binary file QTfrontend/res/edit.png has changed