Laserlicht 2 ماه پیش
والد
کامیت
b7cd2b92ab
4فایلهای تغییر یافته به همراه14 افزوده شده و 4 حذف شده
  1. 3 0
      Mods/vcmi/Content/config/english.json
  2. 3 0
      Mods/vcmi/Content/config/german.json
  3. 4 4
      client/lobby/SelectionTab.cpp
  4. 4 0
      config/campaignSets.json

+ 3 - 0
Mods/vcmi/Content/config/english.json

@@ -836,6 +836,9 @@
 	"vcmi.optionsTab.simturns.blocked1"       : "Simturns: 1 week, contacts blocked",
 	"vcmi.optionsTab.simturns.blocked2"       : "Simturns: 2 weeks, contacts blocked",
 	"vcmi.optionsTab.simturns.blocked4"       : "Simturns: 1 month, contacts blocked",
+
+	"vcmi.campaignSet.chronicles" : "Chronicles",
+	"vcmi.campaignSet.hota" : "Horn of the Abyss",
 	
 	// Translation note: translate strings below using form that is correct for "0 days", "1 day" and "2 days" in your language
 	// Using this information, VCMI will automatically select correct plural form for every possible amount

+ 3 - 0
Mods/vcmi/Content/config/german.json

@@ -835,6 +835,9 @@
 	"vcmi.optionsTab.simturns.blocked1"       : "Simzüge: 1 Woche, Kontakte block.",
 	"vcmi.optionsTab.simturns.blocked2"       : "Simzüge: 2 Wochen, Kontakte block.",
 	"vcmi.optionsTab.simturns.blocked4"       : "Simzüge: 1 Monat, Kontakte block.",
+
+	"vcmi.campaignSet.chronicles" : "Chronicles",
+	"vcmi.campaignSet.hota" : "Horn of the Abyss",
 	
 	// Translation note: translate strings below using form that is correct for "0 days", "1 day" and "2 days" in your language
 	// Using this information, VCMI will automatically select correct plural form for every possible amount

+ 4 - 4
client/lobby/SelectionTab.cpp

@@ -267,10 +267,10 @@ SelectionTab::SelectionTab(ESelectionScreen Type)
 							oneCampaignExists = true;
 
 					if(oneCampaignExists)
-						namesWithIndex.push_back({set.second["index"].isNull() ? std::numeric_limits<si64>::max() : set.second["index"].Integer(), { set.first, set.first + " translation" }});
+						namesWithIndex.push_back({set.second["index"].isNull() ? std::numeric_limits<si64>::max() : set.second["index"].Integer(), { set.first, set.second["text"].isNull() ? set.first : LIBRARY->generaltexth->translate(set.second["text"].String()) }});
 				}
 
-				std::sort(namesWithIndex.begin(), namesWithIndex.end(), [](const std::pair<int, std::pair<std::string, std::string>>& a, const std::pair<int, std::pair<std::string, std::string>>& b)
+				std::sort(namesWithIndex.begin(), namesWithIndex.end(), [](const std::pair<si64, std::pair<std::string, std::string>>& a, const std::pair<si64, std::pair<std::string, std::string>>& b)
 				{
 					if (a.first != b.first) return a.first < b.first;
 					return a.second.second < b.second.second;
@@ -1169,7 +1169,7 @@ CampaignSetSelector::CampaignSetSelector(const std::vector<std::string> & texts,
 	: CWindowObject(BORDERED), texts(texts), cb(cb)
 {
 	OBJECT_CONSTRUCTION;
-	pos = center(Rect(0, 0, 128 + 16, std::min(static_cast<int>(texts.size()), LINES) * 40));
+	pos = center(Rect(0, 0, 200 + 16, std::min(static_cast<int>(texts.size()), LINES) * 40));
 	filledBackground = std::make_shared<FilledTexturePlayerColored>(Rect(0, 0, pos.w, pos.h));
 	filledBackground->setPlayerColor(PlayerColor(1));
 
@@ -1189,7 +1189,7 @@ void CampaignSetSelector::update(int to)
 		if(i>=texts.size())
 			continue;
 
-		auto button = std::make_shared<CToggleButton>(Point(0, 10 + (i - to) * 40), AnimationPath::builtin("GSPBUT2"), CButton::tooltip(), [this, i](bool on){ close(); cb(i); });
+		auto button = std::make_shared<CToggleButton>(Point(0, 10 + (i - to) * 40), AnimationPath::builtin("GSPBUTT"), CButton::tooltip(), [this, i](bool on){ close(); cb(i); });
 		button->setTextOverlay(texts[i], EFonts::FONT_SMALL, Colors::WHITE);
 		buttons.emplace_back(button);
 	}

+ 4 - 0
config/campaignSets.json

@@ -2,6 +2,7 @@
 	"roe" :
 	{
 		"index" : 0,
+		"text" : "core.genrltxt.762",
 		"images" : [ {"x": 0, "y": 0, "name":"CAMPBACK"} ],
 		"exitbutton" : {"x": 658, "y": 482, "name":"CMPSCAN" },
 		"items":
@@ -18,6 +19,7 @@
 	"ab" :
 	{
 		"index" : 1,
+		"text" : "core.genrltxt.745",
 		"images" :
 		[
 			{"x": 0,   "y": 0,   "name":"CampaignBackground6"},
@@ -37,6 +39,7 @@
 	"sod":
 	{
 		"index" : 2,
+		"text" : "core.genrltxt.746",
 		"images" : [ {"x": 0, "y": 0, "name":"CAMPBKX2"} ],
 		"exitbutton" : {"x": 658, "y": 482, "name":"CMPSCAN" },
 		"items":
@@ -53,6 +56,7 @@
 	"chr":
 	{
 		"index" : 3,
+		"text" : "vcmi.campaignSet.chronicles",
 		"images" : [ {"x": 0, "y": 0, "name":"CampaignBackground8"} ],
 		"exitbutton" : {"x": 658, "y": 482, "name":"CMPSCAN" },
 		"items":