1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix CCommanderArtPlace localization + minor fixes

This commit is contained in:
dydzio 2016-11-08 17:26:24 +01:00
parent 96fa0fb6d4
commit b626f9a134
2 changed files with 21 additions and 17 deletions

View File

@ -41,13 +41,13 @@ void CHeroArtPlace::createImage()
{
OBJ_CONSTRUCTION_CAPTURING_ALL;
int graphic = 0;
int imageIndex = 0;
if (ourArt)
graphic = ourArt->artType->iconIndex;
imageIndex = ourArt->artType->iconIndex;
if (locked)
graphic = ArtifactID::ART_LOCK;
imageIndex = ArtifactID::ART_LOCK;
image = new CAnimImage("artifact", graphic);
image = new CAnimImage("artifact", imageIndex);
if (!ourArt)
image->disable();
@ -969,8 +969,7 @@ CCommanderArtPlace::CCommanderArtPlace(Point position, const CGHeroInstance * co
void CCommanderArtPlace::clickLeft(tribool down, bool previousState)
{
if (down && ourArt && text.size())
LOCPLINT->showYesNoDialog("Do you want to give this artifact back to hero?", [this] { returnArtToHeroCallback(); }, [] {});
//CArtPlace::clickLeft(down, previousState);
LOCPLINT->showYesNoDialog(CGI->generaltexth->localizedTexts["commanderWindow"]["artifactMessage"].String(), [this] { returnArtToHeroCallback(); }, [] {});
}
void CCommanderArtPlace::clickRight(tribool down, bool previousState)
@ -983,11 +982,11 @@ void CCommanderArtPlace::createImage()
{
OBJ_CONSTRUCTION_CAPTURING_ALL;
int graphic = 0;
int imageIndex = 0;
if (ourArt)
graphic = ourArt->artType->iconIndex;
imageIndex = ourArt->artType->iconIndex;
image = new CAnimImage("artifact", graphic);
image = new CAnimImage("artifact", imageIndex);
if (!ourArt)
image->disable();
}

View File

@ -27,7 +27,7 @@
"fullscreenButton" :
{
"label" : "Fullscreen",
"help" : "{Fullscreen}\n\n If selected, VCMI will run in fullscreen mode, othervice VCMI will run in window",
"help" : "{Fullscreen}\n\n If selected, VCMI will run in fullscreen mode, othervice VCMI will run in window"
},
"resolutionButton" :
{
@ -50,13 +50,18 @@
"allOf" : "All of the following:",
"noneOf" : "None of the following:"
},
"heroWindow" : {
"openCommander" :
{
"label" : "Open commander window",
"help" : "Displays information about commander of this hero"
}
},
"heroWindow":
{
"openCommander":
{
"label": "Open commander window",
"help": "Displays information about commander of this hero"
}
},
"commanderWindow":
{
"artifactMessage": "Do you want to give this artifact back to hero?"
},
"creatureWindow" :
{
"showBonuses" :