diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 21 |
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) { |