1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-05-27 22:47:48 +02:00

Button hotkeys are now functioning.

This commit is contained in:
OnionKnight 2009-08-17 13:14:37 +00:00
parent 49a142b92e
commit c42ef6a23e

View File

@ -23,10 +23,13 @@ void KeyShortcut::keyPressed(const SDL_KeyboardEvent & key)
{ {
if(vstd::contains(assignedKeys,key.keysym.sym)) if(vstd::contains(assignedKeys,key.keysym.sym))
{ {
if(key.state == SDL_PRESSED) if(key.state == SDL_PRESSED) {
clickLeft(true, pressedL); clickLeft(true, pressedL);
else pressedL = true;
} else {
clickLeft(false, pressedL); clickLeft(false, pressedL);
pressedL = false;
}
} }
} }