浏览代码

Show movement cost immediately after pressing left alt key

Adriankhl 2 年之前
父节点
当前提交
8c5c943da9
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      client/adventureMap/CAdvMapInt.cpp

+ 7 - 0
client/adventureMap/CAdvMapInt.cpp

@@ -49,6 +49,7 @@
 #include "../../lib/mapping/CMap.h"
 #include "../../lib/UnlockGuard.h"
 #include "../../lib/TerrainHandler.h"
+#include <SDL_keycode.h>
 
 #define ADVOPT (conf.go()->ac)
 
@@ -791,6 +792,12 @@ void CAdvMapInt::keyPressed(const SDL_Keycode & key)
 			}
 			return;
 		}
+	case SDLK_LALT:
+		{
+			//fake mouse use to trigger onTileHovered()
+			GH.fakeMouseMove();
+			return;
+		}
 	default:
 		{
 			auto direction = keyToMoveDirection(key);