summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-28 18:23:47 +0000
committerDennis Friis <peavey@placid.dk>2008-04-28 18:23:47 +0000
commita59a96dc0f162a48f8cedcc804e9f89af3b1b9d3 (patch)
tree7eb5aa93265ac5805a39a6abbc50cd1b784e427f
parent7fcc51177970a398742b65aac5817f0bdc62aea9 (diff)
downloadmana-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.gz
mana-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.bz2
mana-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.xz
mana-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.zip
Remove check for KMOD_NONE since this is not working uniformly across systems.
-rw-r--r--ChangeLog2
-rw-r--r--src/game.cpp148
2 files changed, 74 insertions, 76 deletions
diff --git a/ChangeLog b/ChangeLog
index e7cfbdfd..39b3e092 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
the grid for itemcontainer.
* src/game.cpp: Tweak keyboard input handling a bit. This fixes using
emoticons triggering shortcut items to be used.
+ * src/game.cpp: Remove check for KMOD_NONE since this is not working
+ uniformly across systems.
2008-04-27 Dennis Friis <peavey@placid.dk>
diff --git a/src/game.cpp b/src/game.cpp
index f94fd305..9bfdea9a 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -530,85 +530,81 @@ void Game::handleInput()
used = true;
}
}
- if (event.key.keysym.mod == KMOD_NONE)
+ switch (event.key.keysym.sym)
{
- switch (event.key.keysym.sym)
- {
- case SDLK_F1:
- // In-game Help
- if (helpWindow->isVisible())
- {
- helpWindow->setVisible(false);
- }
- else
- {
- helpWindow->loadHelp("index");
- helpWindow->requestMoveToTop();
- }
- used = true;
- break;
-
- case SDLK_F2: requestedWindow = statusWindow; break;
- case SDLK_F3: requestedWindow = inventoryWindow; break;
- case SDLK_F4: requestedWindow = equipmentWindow; break;
- case SDLK_F5: requestedWindow = skillDialog; break;
- case SDLK_F6: requestedWindow = minimap; break;
- case SDLK_F7: requestedWindow = chatWindow; break;
- //case SDLK_F8: requestedWindow = buddyWindow; break;
- case SDLK_F9: requestedWindow = setupWindow; break;
- case SDLK_F10: requestedWindow = debugWindow; break;
- //case SDLK_F11: requestedWindow = newSkillWindow; break;
-
- case SDLK_RETURN:
- // Input chat window
- if (chatWindow->isFocused() ||
- deathNotice != NULL ||
- weightNotice != NULL)
- {
- break;
- }
-
- // Quit by pressing Enter if the exit confirm is there
- if (exitConfirm)
- {
- done = true;
- }
- // Close the Browser if opened
- else if (helpWindow->isVisible())
- {
- helpWindow->setVisible(false);
- }
- // Close the config window, cancelling changes if opened
- else if (setupWindow->isVisible())
- {
- setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
- }
- // Else, open the chat edit box
- else
- {
- chatWindow->requestChatFocus();
- used = true;
- }
- break;
- // Quitting confirmation dialog
- case SDLK_ESCAPE:
- if (!exitConfirm) {
- exitConfirm = new ConfirmDialog(
- "Quit", "Are you sure you want to quit?");
- exitConfirm->addActionListener(&exitListener);
- exitConfirm->requestMoveToTop();
- }
- else
- {
- exitConfirm->action(gcn::ActionEvent(NULL, "no"));
- }
- break;
-
- default:
+ case SDLK_F1:
+ // In-game Help
+ if (helpWindow->isVisible())
+ {
+ helpWindow->setVisible(false);
+ }
+ else
+ {
+ helpWindow->loadHelp("index");
+ helpWindow->requestMoveToTop();
+ }
+ used = true;
+ break;
+
+ case SDLK_F2: requestedWindow = statusWindow; break;
+ case SDLK_F3: requestedWindow = inventoryWindow; break;
+ case SDLK_F4: requestedWindow = equipmentWindow; break;
+ case SDLK_F5: requestedWindow = skillDialog; break;
+ case SDLK_F6: requestedWindow = minimap; break;
+ case SDLK_F7: requestedWindow = chatWindow; break;
+ //case SDLK_F8: requestedWindow = buddyWindow; break;
+ case SDLK_F9: requestedWindow = setupWindow; break;
+ case SDLK_F10: requestedWindow = debugWindow; break;
+ //case SDLK_F11: requestedWindow = newSkillWindow; break;
+
+ case SDLK_RETURN:
+ // Input chat window
+ if (chatWindow->isFocused() ||
+ deathNotice != NULL ||
+ weightNotice != NULL)
+ {
break;
- }
+ }
+
+ // Quit by pressing Enter if the exit confirm is there
+ if (exitConfirm)
+ {
+ done = true;
+ }
+ // Close the Browser if opened
+ else if (helpWindow->isVisible())
+ {
+ helpWindow->setVisible(false);
+ }
+ // Close the config window, cancelling changes if opened
+ else if (setupWindow->isVisible())
+ {
+ setupWindow->action(gcn::ActionEvent(NULL, "cancel"));
+ }
+ // Else, open the chat edit box
+ else
+ {
+ chatWindow->requestChatFocus();
+ used = true;
+ }
+ break;
+ // Quitting confirmation dialog
+ case SDLK_ESCAPE:
+ if (!exitConfirm) {
+ exitConfirm = new ConfirmDialog(
+ "Quit", "Are you sure you want to quit?");
+ exitConfirm->addActionListener(&exitListener);
+ exitConfirm->requestMoveToTop();
+ }
+ else
+ {
+ exitConfirm->action(gcn::ActionEvent(NULL, "no"));
+ }
+ break;
+
+ default:
+ break;
}
-
if (keyboard.isEnabled() && !chatWindow->isFocused())
{
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);