diff options
author | Ira Rice <irarice@gmail.com> | 2009-02-05 11:44:31 -0700 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-02-05 11:44:31 -0700 |
commit | 34f27b882cf63ca4dfda6079253adb959ebaeadd (patch) | |
tree | 7bdc1e9c41865b9b7ba83296d7d4198655fceb7c /src/keyboardconfig.cpp | |
parent | 620e3d945884f0bfa304092f3924c8b7ea6110d0 (diff) | |
download | mana-34f27b882cf63ca4dfda6079253adb959ebaeadd.tar.gz mana-34f27b882cf63ca4dfda6079253adb959ebaeadd.tar.bz2 mana-34f27b882cf63ca4dfda6079253adb959ebaeadd.tar.xz mana-34f27b882cf63ca4dfda6079253adb959ebaeadd.zip |
Rather than to settle for a broken default (if it's left at space,
then you won't be able to type spaces in the NPC integer or string
dialogs. And no, assigning focus to the ok button doesn't resolve
anything, but makes things worse, as then the user has to click on the
input field to input text, then must click the ok button, as the chat
window already overrode it's confirmation action), this commit allows for
both the chat input and the NPC dialog confirming to share the same key,
but allows for people to change one or the other if they want to. This
will still allow for the player to use the keyboard fully for NPC
dialogs, but allow for people who don't like not being able to use chat
with an NPC dialog open to assign confirmation to another key and get
their way as well.
This is a rather ugly way of resolving both sides of the issue, but it's
the only way to appease both sides. The Aethyra players want things the
way they were, while Bjorn wanted things a different way.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/keyboardconfig.cpp')
-rw-r--r-- | src/keyboardconfig.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/keyboardconfig.cpp b/src/keyboardconfig.cpp index 68d51572..745a81db 100644 --- a/src/keyboardconfig.cpp +++ b/src/keyboardconfig.cpp @@ -95,7 +95,7 @@ static KeyData const keyData[KeyboardConfig::KEY_TOTAL] = { {"keyChat", SDLK_RETURN, _("Toggle Chat")}, {"keyChatScrollUp", SDLK_PAGEUP, _("Scroll Chat Up")}, {"keyChatScrollDown", SDLK_PAGEDOWN, _("Scroll Chat Down")}, - {"keyOK", SDLK_SPACE, _("Select OK")}, + {"keyOK", SDLK_RETURN, _("Select OK")}, {"keyQuit", SDLK_ESCAPE, _("Quit")} }; @@ -151,9 +151,10 @@ bool KeyboardConfig::hasConflicts() for (j = i, j++; j < KEY_TOTAL; j++) { // Allow for item shortcut and emote keys to overlap, but no other keys - if (!(((i >= KEY_SHORTCUT_1) && (i <= KEY_SHORTCUT_12)) && - ((j >= KEY_EMOTE_1) && (j <= KEY_EMOTE_12))) - && mKey[i].value == mKey[j].value + if (!((((i >= KEY_SHORTCUT_1) && (i <= KEY_SHORTCUT_12)) && + ((j >= KEY_EMOTE_1) && (j <= KEY_EMOTE_12))) || + ((i == KEY_TOGGLE_CHAT) && (j == KEY_OK))) && + (mKey[i].value == mKey[j].value) ) { return true; |