mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
Moved new texts to config
This commit is contained in:
@@ -30,6 +30,13 @@
|
|||||||
"vcmi.capitalColors.6" : "Teal",
|
"vcmi.capitalColors.6" : "Teal",
|
||||||
"vcmi.capitalColors.7" : "Pink",
|
"vcmi.capitalColors.7" : "Pink",
|
||||||
|
|
||||||
|
"vcmi.radialWheel.mergeSameUnit" : "Merge same creatures",
|
||||||
|
"vcmi.radialWheel.showUnitInformation" : "Show creature information",
|
||||||
|
"vcmi.radialWheel.splitSingleUnit" : "Split off single creature",
|
||||||
|
"vcmi.radialWheel.splitUnitEqually" : "Split creaturess equally",
|
||||||
|
"vcmi.radialWheel.moveUnit" : "Move creatures to another army",
|
||||||
|
"vcmi.radialWheel.splitUnit" : "Split creature to another slot",
|
||||||
|
|
||||||
"vcmi.mainMenu.tutorialNotImplemented" : "Sorry, tutorial is not implemented yet\n",
|
"vcmi.mainMenu.tutorialNotImplemented" : "Sorry, tutorial is not implemented yet\n",
|
||||||
"vcmi.mainMenu.highscoresNotImplemented" : "Sorry, high scores menu is not implemented yet\n",
|
"vcmi.mainMenu.highscoresNotImplemented" : "Sorry, high scores menu is not implemented yet\n",
|
||||||
"vcmi.mainMenu.serverConnecting" : "Connecting...",
|
"vcmi.mainMenu.serverConnecting" : "Connecting...",
|
||||||
|
@@ -363,12 +363,12 @@ void CGarrisonSlot::gesture(bool on, const Point & initialPosition, const Point
|
|||||||
bool hasAnyEmptySlots = hasOtherEmptySlots || hasOwnEmptySlots;
|
bool hasAnyEmptySlots = hasOtherEmptySlots || hasOwnEmptySlots;
|
||||||
|
|
||||||
std::vector<RadialMenuConfig> menuElements = {
|
std::vector<RadialMenuConfig> menuElements = {
|
||||||
{ RadialMenuConfig::ITEM_NW, hasSameUnit, "stackMerge", "Merge same units", [this](){owner->bulkMergeStacks(this);} },
|
{ RadialMenuConfig::ITEM_NW, hasSameUnit, "stackMerge", "vcmi.radialWheel.mergeSameUnit", [this](){owner->bulkMergeStacks(this);} },
|
||||||
{ RadialMenuConfig::ITEM_NE, stackExists, "stackInfo", "Show unit information", [this](){viewInfo();} },
|
{ RadialMenuConfig::ITEM_NE, stackExists, "stackInfo", "vcmi.radialWheel.showUnitInformation", [this](){viewInfo();} },
|
||||||
{ RadialMenuConfig::ITEM_WW, hasOwnEmptySlots, "stackSplitOne", "Split off single unit", [this](){splitIntoParts(this->getGarrison(), 1); } },
|
{ RadialMenuConfig::ITEM_WW, hasOwnEmptySlots, "stackSplitOne", "vcmi.radialWheel.splitSingleUnit", [this](){splitIntoParts(this->getGarrison(), 1); } },
|
||||||
{ RadialMenuConfig::ITEM_EE, hasOwnEmptySlots, "stackSplitEqual", "Split unit equally", [this](){owner->bulkSmartSplitStack(this);} },
|
{ RadialMenuConfig::ITEM_EE, hasOwnEmptySlots, "stackSplitEqual", "vcmi.radialWheel.splitUnitEqually", [this](){owner->bulkSmartSplitStack(this);} },
|
||||||
{ RadialMenuConfig::ITEM_SW, hasOtherEmptySlots, "heroMove", "Move unit to another army", [this](){owner->moveStackToAnotherArmy(this);} },
|
{ RadialMenuConfig::ITEM_SW, hasOtherEmptySlots, "heroMove", "vcmi.radialWheel.moveUnit", [this](){owner->moveStackToAnotherArmy(this);} },
|
||||||
{ RadialMenuConfig::ITEM_SE, hasAnyEmptySlots, "heroSwap", "Split unit to another slot", [this](){ owner->selectSlot(this); owner->splitClick();} },
|
{ RadialMenuConfig::ITEM_SE, hasAnyEmptySlots, "heroSwap", "vcmi.radialWheel.splitUnit", [this](){ owner->selectSlot(this); owner->splitClick();} },
|
||||||
};
|
};
|
||||||
|
|
||||||
GH.windows().createAndPushWindow<RadialMenu>(pos.center(), menuElements);
|
GH.windows().createAndPushWindow<RadialMenu>(pos.center(), menuElements);
|
||||||
|
@@ -16,6 +16,9 @@
|
|||||||
#include "../gui/CGuiHandler.h"
|
#include "../gui/CGuiHandler.h"
|
||||||
#include "../gui/WindowHandler.h"
|
#include "../gui/WindowHandler.h"
|
||||||
#include "../render/IImage.h"
|
#include "../render/IImage.h"
|
||||||
|
#include "../CGameInfo.h"
|
||||||
|
|
||||||
|
#include "../../lib/CGeneralTextHandler.h"
|
||||||
|
|
||||||
RadialMenuItem::RadialMenuItem(const std::string & imageName, const std::string & hoverText, const std::function<void()> & callback)
|
RadialMenuItem::RadialMenuItem(const std::string & imageName, const std::string & hoverText, const std::function<void()> & callback)
|
||||||
: callback(callback)
|
: callback(callback)
|
||||||
@@ -66,7 +69,7 @@ void RadialMenu::addItem(const Point & offset, bool enabled, const std::string &
|
|||||||
if (!enabled)
|
if (!enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto item = std::make_shared<RadialMenuItem>(path, hoverText, callback);
|
auto item = std::make_shared<RadialMenuItem>(path, CGI->generaltexth->translate(hoverText), callback);
|
||||||
|
|
||||||
item->moveBy(offset);
|
item->moveBy(offset);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user