mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Added code to display some HD mod buttons in hero exchange window
This commit is contained in:
parent
24d2d5b702
commit
222a0e40c7
@ -946,6 +946,17 @@ CExchangeWindow::CExchangeWindow(ObjectInstanceID hero1, ObjectInstanceID hero2,
|
|||||||
garr->addSplitBtn(std::make_shared<CButton>( Point( 10, newLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
|
garr->addSplitBtn(std::make_shared<CButton>( Point( 10, newLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
|
||||||
garr->addSplitBtn(std::make_shared<CButton>( Point(740, newLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
|
garr->addSplitBtn(std::make_shared<CButton>( Point(740, newLayout ? 122 : 132), "TSBTNS.DEF", CButton::tooltip(CGI->generaltexth->tcommands[3]), splitButtonCallback));
|
||||||
|
|
||||||
|
if (newLayout && (CGI->generaltexth->newCommands.size() >= 5))
|
||||||
|
{
|
||||||
|
auto nothing = [](){};
|
||||||
|
moveAllGarrButtonLeft = std::make_shared<CButton>(Point(325, 121), "SWCMR.DEF", CButton::tooltip(CGI->generaltexth->newCommands[1]), nothing);
|
||||||
|
echangeGarrButton = std::make_shared<CButton>(Point(377, 121), "SWXCH.DEF", CButton::tooltip(CGI->generaltexth->newCommands[2]), nothing);
|
||||||
|
moveAllGarrButtonRight = std::make_shared<CButton>(Point(425, 121), "SWCML.DEF", CButton::tooltip(CGI->generaltexth->newCommands[1]), nothing);
|
||||||
|
moveArtifactsButtonLeft = std::make_shared<CButton>(Point(325, 180), "SWAMR.DEF", CButton::tooltip(CGI->generaltexth->newCommands[3]), nothing);
|
||||||
|
echangeArtifactsButton = std::make_shared<CButton>(Point(377, 180), "SWXCH.DEF", CButton::tooltip(CGI->generaltexth->newCommands[4]), nothing);
|
||||||
|
moveArtifactsButtonRight = std::make_shared<CButton>(Point(425, 180), "SWAML.DEF", CButton::tooltip(CGI->generaltexth->newCommands[3]), nothing);
|
||||||
|
}
|
||||||
|
|
||||||
updateWidgets();
|
updateWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,6 +310,12 @@ class CExchangeWindow : public CStatusbarWindow, public CGarrisonHolder, public
|
|||||||
std::array<std::shared_ptr<CButton>, 2> questlogButton;
|
std::array<std::shared_ptr<CButton>, 2> questlogButton;
|
||||||
|
|
||||||
std::shared_ptr<CGarrisonInt> garr;
|
std::shared_ptr<CGarrisonInt> garr;
|
||||||
|
std::shared_ptr<CButton> moveAllGarrButtonLeft;
|
||||||
|
std::shared_ptr<CButton> echangeGarrButton;
|
||||||
|
std::shared_ptr<CButton> moveAllGarrButtonRight;
|
||||||
|
std::shared_ptr<CButton> moveArtifactsButtonLeft;
|
||||||
|
std::shared_ptr<CButton> echangeArtifactsButton;
|
||||||
|
std::shared_ptr<CButton> moveArtifactsButtonRight;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::array<const CGHeroInstance *, 2> heroInst;
|
std::array<const CGHeroInstance *, 2> heroInst;
|
||||||
|
@ -332,6 +332,10 @@ CGeneralTextHandler::CGeneralTextHandler()
|
|||||||
readToVector("DATA/TENTCOLR.TXT", tentColors);
|
readToVector("DATA/TENTCOLR.TXT", tentColors);
|
||||||
readToVector("DATA/SKILLLEV.TXT", levels);
|
readToVector("DATA/SKILLLEV.TXT", levels);
|
||||||
|
|
||||||
|
static const char *NEW_COMMANDS = "DATA/XCOMMAND.TXT";
|
||||||
|
if (CResourceHandler::get()->existsResource(ResourceID(NEW_COMMANDS, EResType::TEXT)))
|
||||||
|
readToVector(NEW_COMMANDS, newCommands);
|
||||||
|
|
||||||
localizedTexts = JsonNode(ResourceID("config/translate.json", EResType::TEXT));
|
localizedTexts = JsonNode(ResourceID("config/translate.json", EResType::TEXT));
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -110,6 +110,8 @@ public:
|
|||||||
std::vector<std::string> tavernInfo;
|
std::vector<std::string> tavernInfo;
|
||||||
std::vector<std::string> tavernRumors;
|
std::vector<std::string> tavernRumors;
|
||||||
|
|
||||||
|
std::vector<std::string> newCommands; // extra commands for HD mod
|
||||||
|
|
||||||
std::vector<std::pair<std::string,std::string>> zelp;
|
std::vector<std::pair<std::string,std::string>> zelp;
|
||||||
std::vector<std::string> lossCondtions;
|
std::vector<std::string> lossCondtions;
|
||||||
std::vector<std::string> victoryConditions;
|
std::vector<std::string> victoryConditions;
|
||||||
|
Loading…
Reference in New Issue
Block a user