1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

replaced SDLK_LSHIFT check with GH.isKeyboardShiftDown()

This commit is contained in:
krs 2023-04-07 22:06:57 +03:00
parent 3194999809
commit 7eda4b6c1e

View File

@ -198,7 +198,7 @@ void BattleWindow::keyPressed(const SDL_Keycode & key)
{
owner.actionsController->endCastingSpell();
}
else if(key == SDLK_LSHIFT)
else if(GH.isKeyboardShiftDown())
{
// save and activate setting
Settings movementHighlightOnHover = settings.write["battle"]["movementHighlightOnHover"];
@ -209,7 +209,7 @@ void BattleWindow::keyPressed(const SDL_Keycode & key)
void BattleWindow::keyReleased(const SDL_Keycode & key)
{
if(key == SDLK_LSHIFT)
if(!GH.isKeyboardShiftDown())
{
// set back to initial state
Settings movementHighlightOnHover = settings.write["battle"]["movementHighlightOnHover"];