Merge pull request #18 from LocutusOfBorg/update-translation
authorsheepluva <sheepluva@users.noreply.github.com>
Sat, 08 Nov 2014 00:17:57 +0100
changeset 10467 7d0fbc847df9
parent 10466 aa5c64a58714 (diff)
parent 10461 37e34483e859 (current diff)
child 10468 1648912925f9
child 10469 561b592183b0
Merge pull request #18 from LocutusOfBorg/update-translation Update italian translation
--- a/QTfrontend/res/css/qt.css	Fri Oct 31 19:35:55 2014 +0100
+++ b/QTfrontend/res/css/qt.css	Sat Nov 08 00:17:57 2014 +0100
@@ -275,6 +275,21 @@
 height: 6px;
 border-radius: 3px;
 }
+#mapFeatureSize {
+margin-left: 3px;
+}
+
+#mapFeatureSize::groove::horizontal {
+/* background-color: #141250; 
+background-color: rgba(20, 18, 80, 50%);
+*/
+background-color: rgba(0, 0, 0, 60%);
+}
+#mapFeatureSize::handle {
+/* background-color: #141250; */
+background-color: rgba(0, 0, 0, 60%);
+border-radius: 5px;
+}
 
 HatButton, ThemeButton {
 text-align: left;
--- a/QTfrontend/ui/widget/mapContainer.cpp	Fri Oct 31 19:35:55 2014 +0100
+++ b/QTfrontend/ui/widget/mapContainer.cpp	Sat Nov 08 00:17:57 2014 +0100
@@ -16,27 +16,28 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <QPushButton>
+#include <QBitmap>
 #include <QBuffer>
-#include <QUuid>
-#include <QBitmap>
-#include <QPainter>
-#include <QLinearGradient>
 #include <QColor>
-#include <QTextStream>
-#include <QLabel>
-#include <QListView>
-#include <QVBoxLayout>
-#include <QIcon>
-#include <QLineEdit>
-#include <QStringListModel>
-#include <QListWidget>
-#include <QListWidgetItem>
 #include <QDebug>
 #include <QFile>
 #include <QFileDialog>
+#include <QIcon>
 #include <QInputDialog>
+#include <QLabel>
+#include <QLinearGradient>
+#include <QLineEdit>
+#include <QListView>
+#include <QListWidget>
+#include <QListWidgetItem>
 #include <QMessageBox>
+#include <QPainter>
+#include <QPushButton>
+#include <QSlider>
+#include <QStringListModel>
+#include <QTextStream>
+#include <QUuid>
+#include <QVBoxLayout>
 
 #include "hwconsts.h"
 #include "mapContainer.h"
@@ -152,6 +153,15 @@
     leftLayout->addWidget(mapPreview, 0);
     connect(mapPreview, SIGNAL(clicked()), this, SLOT(previewClicked()));
 
+    mapFeatureSize = new QSlider(Qt::Horizontal, this);
+    mapFeatureSize->setObjectName("mapFeatureSize");
+    //mapFeatureSize->setTickPosition(QSlider::TicksBelow);
+    mapFeatureSize->setMaximum(100);
+    mapFeatureSize->setMinimum(1);
+    mapFeatureSize->setFixedWidth(259);
+    mapFeatureSize->setValue(50);
+    leftLayout->addWidget(mapFeatureSize, 0);
+
     /* Bottom-Left layout */
 
     QVBoxLayout * bottomLeftLayout = new QVBoxLayout();
@@ -544,19 +554,24 @@
     {
         mapgen = m;
 
+        bool f = false;
         switch (m)
         {
             case MAPGEN_REGULAR:
                 m_mapInfo.type = MapModel::GeneratedMap;
+                f = true;
                 break;
             case MAPGEN_MAZE:
                 m_mapInfo.type = MapModel::GeneratedMaze;
+                f = true;
                 break;
             case MAPGEN_PERLIN:
                 m_mapInfo.type = MapModel::GeneratedPerlin;
+                f = true;
                 break;
             case MAPGEN_DRAWN:
                 m_mapInfo.type = MapModel::HandDrawnMap;
+                f = true;
                 break;
             case MAPGEN_MAP:
                 switch (m_mapInfo.type)
@@ -572,7 +587,8 @@
                 break;
         }
 
-        emit mapgenChanged(m);
+        if(f)
+            changeMapType(m_mapInfo.type, QModelIndex());
     }
 }
 
@@ -873,11 +889,8 @@
         mapList->scrollTo(map);
     }
 
-    if (map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>())
-        setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
-    else
-        Q_ASSERT(false); // Houston, we have a problem.
-
+    Q_ASSERT(map.data(Qt::UserRole + 1).canConvert<MapModel::MapInfo>()); // Houston, we have a problem.
+    setMapInfo(map.data(Qt::UserRole + 1).value<MapModel::MapInfo>());
 }
 
 void HWMapContainer::setMapInfo(MapModel::MapInfo mapInfo)
--- a/QTfrontend/ui/widget/mapContainer.h	Fri Oct 31 19:35:55 2014 +0100
+++ b/QTfrontend/ui/widget/mapContainer.h	Sat Nov 08 00:17:57 2014 +0100
@@ -20,13 +20,14 @@
 #ifndef _HWMAP_CONTAINER_INCLUDED
 #define _HWMAP_CONTAINER_INCLUDED
 
-#include <QWidget>
-#include <QGridLayout>
-#include <QVBoxLayout>
+#include <QByteArray>
 #include <QComboBox>
+#include <QGridLayout>
 #include <QLabel>
-#include <QByteArray>
 #include <QLineEdit>
+#include <QSlider>
+#include <QVBoxLayout>
+#include <QWidget>
 
 #include "DataManager.h"
 
@@ -117,6 +118,7 @@
     private:
         QVBoxLayout mainLayout;
         QPushButton* mapPreview;
+        QSlider* mapFeatureSize;
         QComboBox* chooseMap;
         MapModel * m_staticMapModel;
         MapModel * m_missionMapModel;
--- a/hedgewars/uTypes.pas	Fri Oct 31 19:35:55 2014 +0100
+++ b/hedgewars/uTypes.pas	Sat Nov 08 00:17:57 2014 +0100
@@ -449,7 +449,7 @@
             sidConfirm, sidSuddenDeath, sidRemaining, sidFuel, sidSync,
             sidNoEndTurn, sidNotYetAvailable, sidRoundSD, sidRoundsSD, sidReady,
             sidBounce1, sidBounce2, sidBounce3, sidBounce4, sidBounce5, sidBounce,
-            sidMute, sidAFK, sidAutoCameraOn, sidAutoCameraOff);
+            sidMute, sidAFK, sidAutoCameraOff, sidAutoCameraOn);
 
     // Events that are important for the course of the game or at least interesting for other reasons
     TEventId = (eidDied, eidDrowned, eidRoundStart, eidRoundWin, eidRoundDraw,
--- a/project_files/hedgewars.pro	Fri Oct 31 19:35:55 2014 +0100
+++ b/project_files/hedgewars.pro	Sat Nov 08 00:17:57 2014 +0100
@@ -251,7 +251,7 @@
 
 RESOURCES += ../QTfrontend/hedgewars.qrc
 
-LIBS += -L../bin -lhwphysfs -lphyslayer
+LIBS += -L../bin -lphysfs -lphyslayer
 
 macx {
     QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6