Frontend:
authorsmxx
Tue, 30 Mar 2010 20:18:04 +0000
changeset 3185 19d84448835f
parent 3184 4f02f6a834b7
child 3186 8d3e4e9a5199
Frontend: * Added separator and better sorting to map selection * Updated German translation
QTfrontend/main.cpp
QTfrontend/mapContainer.cpp
hedgewars/uStore.pas
share/hedgewars/Data/Locale/hedgewars_de.qm
share/hedgewars/Data/Locale/hedgewars_de.ts
--- a/QTfrontend/main.cpp	Tue Mar 30 20:17:12 2010 +0000
+++ b/QTfrontend/main.cpp	Tue Mar 30 20:18:04 2010 +0000
@@ -104,6 +104,10 @@
                 "background-color: rgba(13, 5, 68, 70%);"
             "}"
 
+            "QComboBox::separator {"
+                "border: solid; border-width: 3px; border-color: #ffcc00;"
+            "}"
+
             "QPushButton, QListWidget, QTableView, QLineEdit, QHeaderView, "
             "QTextBrowser, QSpinBox, QToolBox, QComboBox, "
             "QComboBox QAbstractItemView, IconedGroupBox, "
--- a/QTfrontend/mapContainer.cpp	Tue Mar 30 20:17:12 2010 +0000
+++ b/QTfrontend/mapContainer.cpp	Tue Mar 30 20:18:04 2010 +0000
@@ -63,6 +63,9 @@
     chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
     chooseMap->addItem(QComboBox::tr("generated map..."));
     chooseMap->addItem(QComboBox::tr("generated maze..."));
+    chooseMap->insertSeparator(chooseMap->count()); // separator between generators and missions
+
+    int missionindex = chooseMap->count();
     for (int i = 0; i < mapList->size(); ++i) {
         QString map = (*mapList)[i];
         QFile mapCfgFile(
@@ -88,10 +91,14 @@
             else
                 mapInfo.push_back(18);
             mapInfo.push_back(mapLuaFile.exists());
-            chooseMap->addItem(mapLuaFile.exists() ? (QComboBox::tr("Mission") + ": " + map) : map, mapInfo);
+            if(mapLuaFile.exists())
+                chooseMap->insertItem(missionindex++, QComboBox::tr("Mission") + ": " + map, mapInfo);
+            else
+                chooseMap->addItem(map, mapInfo);
             mapCfgFile.close();
         }
     }
+    chooseMap->insertSeparator(missionindex); // separator between missions and maps
 
     connect(chooseMap, SIGNAL(currentIndexChanged(int)), this, SLOT(mapChanged(int)));
     mainLayout.addWidget(chooseMap, 1, 1);
--- a/hedgewars/uStore.pas	Tue Mar 30 20:17:12 2010 +0000
+++ b/hedgewars/uStore.pas	Tue Mar 30 20:18:04 2010 +0000
@@ -355,7 +355,7 @@
     with Fontz[fi] do
         begin
         s:= Pathz[ptFonts] + '/' + Name;
-        WriteToConsole(msgLoading + s + '... ');
+        WriteToConsole(msgLoading + s + ' (' + inttostr(Height) + 'pt)... ');
         Handle:= TTF_OpenFont(Str2PChar(s), Height);
         SDLTry(Handle <> nil, true);
         TTF_SetFontStyle(Handle, style);
Binary file share/hedgewars/Data/Locale/hedgewars_de.qm has changed
--- a/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 30 20:17:12 2010 +0000
+++ b/share/hedgewars/Data/Locale/hedgewars_de.ts	Tue Mar 30 20:18:04 2010 +0000
@@ -716,7 +716,7 @@
     <name>QComboBox</name>
     <message>
         <source>generated map...</source>
-        <translation>Generierte Karte ...</translation>
+        <translation>Zufallskarte...</translation>
     </message>
     <message>
         <source>Human</source>
@@ -736,7 +736,7 @@
     </message>
     <message>
         <source>generated maze...</source>
-        <translation>Generiertes Labyrinth ...</translation>
+        <translation>Zufallslabyrinth...</translation>
     </message>
 </context>
 <context>