1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00
Changes were reviewed manually
This commit is contained in:
Alexander Wilms
2024-06-24 03:23:26 +02:00
parent 820b1b446e
commit 02e429e973
277 changed files with 815 additions and 815 deletions

View File

@@ -221,7 +221,7 @@ void CInGameConsole::keyPressed (EShortcut key)
}
}
void CInGameConsole::textInputed(const std::string & inputtedText)
void CInGameConsole::textInputted(const std::string & inputtedText)
{
if (LOCPLINT->cingconsole != this)
return;

View File

@@ -50,7 +50,7 @@ public:
void show(Canvas & to) override;
void showAll(Canvas & to) override;
void keyPressed(EShortcut key) override;
void textInputed(const std::string & enteredText) override;
void textInputted(const std::string & enteredText) override;
void textEdited(const std::string & enteredText) override;
bool captureThisKey(EShortcut key) override;

View File

@@ -380,7 +380,7 @@ std::shared_ptr<CIntObject> CTownList::CTownItem::genSelection()
void CTownList::CTownItem::update()
{
size_t iconIndex = town->town->clientInfo.icons[town->hasFort()][town->builded >= CGI->settings()->getInteger(EGameSettings::TOWNS_BUILDINGS_PER_TURN_CAP)];
size_t iconIndex = town->town->clientInfo.icons[town->hasFort()][town->built >= CGI->settings()->getInteger(EGameSettings::TOWNS_BUILDINGS_PER_TURN_CAP)];
picture->setFrame(iconIndex + 2);
redraw();

View File

@@ -92,9 +92,9 @@ CMinimap::CMinimap(const Rect & position)
{
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
double maxSideLenghtSrc = std::max(LOCPLINT->cb->getMapSize().x, LOCPLINT->cb->getMapSize().y);
double maxSideLenghtDst = std::max(position.w, position.h);
double resize = maxSideLenghtSrc / maxSideLenghtDst;
double maxSideLengthSrc = std::max(LOCPLINT->cb->getMapSize().x, LOCPLINT->cb->getMapSize().y);
double maxSideLengthDst = std::max(position.w, position.h);
double resize = maxSideLengthSrc / maxSideLengthDst;
Point newMinimapSize = Point(LOCPLINT->cb->getMapSize().x/ resize, LOCPLINT->cb->getMapSize().y / resize);
Point offset = Point((std::max(newMinimapSize.x, newMinimapSize.y) - newMinimapSize.x) / 2, (std::max(newMinimapSize.x, newMinimapSize.y) - newMinimapSize.y) / 2);