summaryrefslogtreecommitdiff
path: root/src/keyboardconfig.h
diff options
context:
space:
mode:
authorForge <jgrimbert@free.fr>2009-01-02 21:31:39 +0100
committerForge <jgrimbert@free.fr>2009-01-02 21:31:39 +0100
commit402ac13b30d9bcd3c0f67184c9886a2d46516d2f (patch)
treed4ce0b544585ae8f9aed3936987e73d5e92c70bb /src/keyboardconfig.h
parentda857b4386d53bed713871f31f1b4e6b0851373f (diff)
downloadmana-client-402ac13b30d9bcd3c0f67184c9886a2d46516d2f.tar.gz
mana-client-402ac13b30d9bcd3c0f67184c9886a2d46516d2f.tar.bz2
mana-client-402ac13b30d9bcd3c0f67184c9886a2d46516d2f.tar.xz
mana-client-402ac13b30d9bcd3c0f67184c9886a2d46516d2f.zip
Step 1.5 of smiley update: allow usage of same key for smiley and
different purpose (as smiley are requiring a special key press, that's not a problem to assign the same key to differents purpose) The function of game.cpp get reindented in the process, but the actual change is minor. The keyboardconfig get a new function, returning directly the emoticon offset from the key pressed. (later, that function will return the index of the smiley shortcut/array that has been selected... later) Signed-off-by: Forge <jgrimbert@free.fr>
Diffstat (limited to 'src/keyboardconfig.h')
-rw-r--r--src/keyboardconfig.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/keyboardconfig.h b/src/keyboardconfig.h
index 08c1dba7..a0b67f5d 100644
--- a/src/keyboardconfig.h
+++ b/src/keyboardconfig.h
@@ -102,6 +102,11 @@ class KeyboardConfig
int getKeyIndex(int keyValue) const;
/**
+ * Get the key function index for smiley by providing the offset value.
+ */
+ int getKeySmilieOffset(int keyValue) const;
+
+ /**
* Set the enable flag, which will stop the user from doing actions.
*/
void setEnabled(bool flag)
@@ -141,6 +146,8 @@ class KeyboardConfig
* KEY_TOTAL should always be last (used as a conditional in loops).
* The key assignment view gets arranged according to the order of
* these values.
+ *
+ * KEY_SMILEY_* must be also at the end (just before KEY_TOTAL)
*/
enum KeyAction {
KEY_NO_VALUE = -1,