diff --git a/Mods/vcmi/Content/config/english.json b/Mods/vcmi/Content/config/english.json index d86f85542..d7a451a30 100644 --- a/Mods/vcmi/Content/config/english.json +++ b/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 diff --git a/Mods/vcmi/Content/config/german.json b/Mods/vcmi/Content/config/german.json index 4b9a01c6e..46c98c754 100644 --- a/Mods/vcmi/Content/config/german.json +++ b/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 diff --git a/client/lobby/SelectionTab.cpp b/client/lobby/SelectionTab.cpp index d7b0b79a0..83ba0820e 100644 --- a/client/lobby/SelectionTab.cpp +++ b/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::max() : set.second["index"].Integer(), { set.first, set.first + " translation" }}); + namesWithIndex.push_back({set.second["index"].isNull() ? std::numeric_limits::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>& a, const std::pair>& b) + std::sort(namesWithIndex.begin(), namesWithIndex.end(), [](const std::pair>& a, const std::pair>& 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 & texts, : CWindowObject(BORDERED), texts(texts), cb(cb) { OBJECT_CONSTRUCTION; - pos = center(Rect(0, 0, 128 + 16, std::min(static_cast(texts.size()), LINES) * 40)); + pos = center(Rect(0, 0, 200 + 16, std::min(static_cast(texts.size()), LINES) * 40)); filledBackground = std::make_shared(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(Point(0, 10 + (i - to) * 40), AnimationPath::builtin("GSPBUT2"), CButton::tooltip(), [this, i](bool on){ close(); cb(i); }); + auto button = std::make_shared(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); } diff --git a/config/campaignSets.json b/config/campaignSets.json index 979e8ba6c..81496f127 100644 --- a/config/campaignSets.json +++ b/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":