summaryrefslogtreecommitdiff
path: root/src/game.cpp
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 /src/game.cpp
parent7fcc51177970a398742b65aac5817f0bdc62aea9 (diff)
downloadmana-client-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.gz
mana-client-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.bz2
mana-client-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.tar.xz
mana-client-a59a96dc0f162a48f8cedcc804e9f89af3b1b9d3.zip
Remove check for KMOD_NONE since this is not working uniformly across systems.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp148
1 files changed, 72 insertions, 76 deletions
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);