浏览代码

Fix invisible save select when click on save name area

ArseniyShestakov 11 年之前
父节点
当前提交
6fd0f76547
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      client/CPreGame.cpp

+ 8 - 1
client/CPreGame.cpp

@@ -1586,7 +1586,14 @@ int SelectionTab::getLine()
 	Point clickPos(GH.current->button.x, GH.current->button.y);
 	Point clickPos(GH.current->button.x, GH.current->button.y);
 	clickPos = clickPos - pos.topLeft();
 	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
 		line = (clickPos.y-115) / 25; //which line
 	}
 	}