浏览代码

activate battle hexes after heroes

gives hexes higher priority when performing "hit test" for mouse click as CGuiHandler::handleElementActivate() uses push_front to a list
this fixes RMB click on the topmost corner stacks: now it shows stack info instead of hero
Andrey Filipenkov 3 年之前
父节点
当前提交
e6e7679a2c
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      client/battle/CBattleInterface.cpp

+ 4 - 3
client/battle/CBattleInterface.cpp

@@ -502,13 +502,14 @@ void CBattleInterface::activate()
 	bWait->activate();
 	bDefence->activate();
 
-	for (auto hex : bfield)
-		hex->activate();
-
 	if (attackingHero)
 		attackingHero->activate();
 	if (defendingHero)
 		defendingHero->activate();
+
+	for (auto hex : bfield)
+		hex->activate();
+
 	if (settings["battle"]["showQueue"].Bool())
 		queue->activate();