diff options
author | David Athay <ko2fan@gmail.com> | 2008-07-22 15:26:00 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-07-22 15:26:00 +0000 |
commit | c17120c9838665fd546c6ae7a1d81de79659d429 (patch) | |
tree | 5e708b39bb73c7a2d6724031b799303071ae4a10 | |
parent | 93459202b58b6199e588b5c6768ef8889aa2aa9f (diff) | |
download | mana-c17120c9838665fd546c6ae7a1d81de79659d429.tar.gz mana-c17120c9838665fd546c6ae7a1d81de79659d429.tar.bz2 mana-c17120c9838665fd546c6ae7a1d81de79659d429.tar.xz mana-c17120c9838665fd546c6ae7a1d81de79659d429.zip |
User can now configure which modifier key is used for smilies.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/game.cpp | 5 | ||||
-rw-r--r-- | src/keyboardconfig.cpp | 1 | ||||
-rw-r--r-- | src/keyboardconfig.h | 1 |
4 files changed, 9 insertions, 0 deletions
@@ -1,6 +1,8 @@ 2008-07-22 David Athay <ko2fan@gmail.com> * 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 <ko2fan@gmail.com> 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, |