|
@@ -12,14 +12,10 @@
|
|
|
|
|
|
#include "../GameEngine.h"
|
|
#include "../GameEngine.h"
|
|
#include "../GameInstance.h"
|
|
#include "../GameInstance.h"
|
|
-#include "../gui/Shortcut.h"
|
|
|
|
|
|
|
|
#include "CComponent.h"
|
|
#include "CComponent.h"
|
|
#include "Images.h"
|
|
#include "Images.h"
|
|
|
|
|
|
-#include "../render/Canvas.h"
|
|
|
|
-#include "../render/Colors.h"
|
|
|
|
-#include "../render/IRenderHandler.h"
|
|
|
|
#include "../CPlayerInterface.h"
|
|
#include "../CPlayerInterface.h"
|
|
|
|
|
|
#include "../../lib/CConfigHandler.h"
|
|
#include "../../lib/CConfigHandler.h"
|
|
@@ -202,21 +198,23 @@ void CCommanderArtPlace::showPopupWindow(const Point & cursorPosition)
|
|
void CArtPlace::lockSlot(bool on)
|
|
void CArtPlace::lockSlot(bool on)
|
|
{
|
|
{
|
|
locked = on;
|
|
locked = on;
|
|
- if(on)
|
|
|
|
|
|
+ if(artId == ArtifactID::NONE)
|
|
{
|
|
{
|
|
- image->setFrame(ArtifactID::ART_LOCK);
|
|
|
|
hoverText = LIBRARY->generaltexth->allTexts[507];
|
|
hoverText = LIBRARY->generaltexth->allTexts[507];
|
|
}
|
|
}
|
|
- else if(artId != ArtifactID::NONE)
|
|
|
|
|
|
+ else if(on)
|
|
{
|
|
{
|
|
- image->setFrame(imageIndex);
|
|
|
|
- auto hoverText = MetaString::createFromRawString(LIBRARY->generaltexth->heroscrn[1]);
|
|
|
|
|
|
+ image->setFrame(ArtifactID::ART_LOCK);
|
|
|
|
+ auto hoverText = MetaString::createFromTextID("vcmi.heroWindow.lockedartifact.hover");
|
|
hoverText.replaceName(artId);
|
|
hoverText.replaceName(artId);
|
|
this->hoverText = hoverText.toString();
|
|
this->hoverText = hoverText.toString();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- hoverText = LIBRARY->generaltexth->allTexts[507];
|
|
|
|
|
|
+ image->setFrame(imageIndex);
|
|
|
|
+ auto hoverText = MetaString::createFromRawString(LIBRARY->generaltexth->heroscrn[1]);
|
|
|
|
+ hoverText.replaceName(artId);
|
|
|
|
+ this->hoverText = hoverText.toString();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|