From 34f27b882cf63ca4dfda6079253adb959ebaeadd Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Thu, 5 Feb 2009 11:44:31 -0700 Subject: 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 --- src/keyboardconfig.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/keyboardconfig.cpp') 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; -- cgit v1.2.3-60-g2f50