summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-11-06 01:53:49 +0000
committerDennis Friis <peavey@placid.dk>2008-11-06 01:53:49 +0000
commit1afaba7d73a6158abfbbbcc7d881170e5b3ddd50 (patch)
treed4149241a278f8700f4a30b0410aa7629afd5f76 /src
parent75699101c3710405fe4dedb420b3f3b63436cc28 (diff)
downloadmana-1afaba7d73a6158abfbbbcc7d881170e5b3ddd50.tar.gz
mana-1afaba7d73a6158abfbbbcc7d881170e5b3ddd50.tar.bz2
mana-1afaba7d73a6158abfbbbcc7d881170e5b3ddd50.tar.xz
mana-1afaba7d73a6158abfbbbcc7d881170e5b3ddd50.zip
Do not activate shortcuts if tradewindow is visible.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3e3cb4b5..fc9183d4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -664,15 +664,18 @@ void Game::handleInput()
if (keyboard.isEnabled() && !chatWindow->isInputFocused())
{
const int tKey = keyboard.getKeyIndex(event.key.keysym.sym);
- // Checks if any item shortcut is pressed.
- for (int i = KeyboardConfig::KEY_SHORTCUT_0;
- i <= KeyboardConfig::KEY_SHORTCUT_9;
- i++)
- {
- if (tKey == i && !used) {
- itemShortcut->useItem(
- i - KeyboardConfig::KEY_SHORTCUT_0);
- break;
+ // Do not activate shortcuts if tradewindow is visible
+ if (!tradeWindow->isVisible())
+ // Checks if any item shortcut is pressed.
+ for (int i = KeyboardConfig::KEY_SHORTCUT_0;
+ i <= KeyboardConfig::KEY_SHORTCUT_9;
+ i++)
+ {
+ if (tKey == i && !used) {
+ itemShortcut->useItem(
+ i - KeyboardConfig::KEY_SHORTCUT_0);
+ break;
+ }
}
}
switch (tKey) {