1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Merge pull request #60 from ArseniyShestakov/saveMenuListFix

Fix invisible save select when click on save name area #944
This commit is contained in:
DjWarmonger
2014-11-23 10:42:17 +01:00

View File

@@ -1586,7 +1586,14 @@ int SelectionTab::getLine()
Point clickPos(GH.current->button.x, GH.current->button.y);
clickPos = clickPos - pos.topLeft();
if (clickPos.y > 115 && clickPos.y < 564 && clickPos.x > 22 && clickPos.x < 371)
// Ignore clicks on save name area
int maxPosY;
if(tabType == CMenuScreen::saveGame)
maxPosY = 516;
else
maxPosY = 564;
if(clickPos.y > 115 && clickPos.y < maxPosY && clickPos.x > 22 && clickPos.x < 371)
{
line = (clickPos.y-115) / 25; //which line
}