From c17120c9838665fd546c6ae7a1d81de79659d429 Mon Sep 17 00:00:00 2001 From: David Athay Date: Tue, 22 Jul 2008 15:26:00 +0000 Subject: User can now configure which modifier key is used for smilies. --- ChangeLog | 2 ++ src/game.cpp | 5 +++++ src/keyboardconfig.cpp | 1 + src/keyboardconfig.h | 1 + 4 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 2fddc422..d7ca07cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2008-07-22 David Athay * src/game.cpp: Revert the Alt-Gr fix as it did not work. + * src/game.cpp, src/keyboardconfig.cpp, src/keyboardconfig.h: User can + now configure which modifier key is used for smilies. 2008-07-21 David Athay diff --git a/src/game.cpp b/src/game.cpp index 8961c859..cc37fc5a 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -511,7 +511,11 @@ void Game::handleInput() used = true; break; } + } + // Smilie + if (keyboard.isKeyActive(keyboard.KEY_SMILIE)) + { // Emotions Uint8 emotion; switch (event.key.keysym.sym) @@ -535,6 +539,7 @@ void Game::handleInput() { player_node->emote(emotion); used = true; + return; } } switch (event.key.keysym.sym) diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index a959e244..9f558883 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -43,6 +43,7 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = { {"keyMoveLeft", SDLK_LEFT, "Move Left"}, {"keyMoveRight", SDLK_RIGHT, "Move Right"}, {"keyAttack", SDLK_LCTRL, "Attack"}, + {"keySmilie", SDLK_LALT, "Smilie"}, {"keyTarget", SDLK_LSHIFT, "Target"}, {"keyTargetClosest", SDLK_a, "Target Closest"}, {"keyTargetPlayer", SDLK_q, "Target Player"}, diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h index 53a5c96d..b57136dc 100644 --- a/src/keyboardconfig.h +++ b/src/keyboardconfig.h @@ -151,6 +151,7 @@ class KeyboardConfig KEY_MOVE_LEFT, KEY_MOVE_RIGHT, KEY_ATTACK, + KEY_SMILIE, KEY_TARGET, KEY_TARGET_CLOSEST, KEY_TARGET_PLAYER, -- cgit v1.2.3-70-g09d2