فهرست منبع

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);