diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-04-29 12:30:33 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2025-04-29 12:30:33 +0200 |
commit | eda60e15c443794f98ad4d9ab3e9d26987dea994 (patch) | |
tree | 1c2f02fd88ce59351ac8cd94734c6d26d58baa36 | |
parent | 913cda59de309f967a24b10575dc3443f382a8f9 (diff) | |
download | mana-eda60e15c443794f98ad4d9ab3e9d26987dea994.tar.gz mana-eda60e15c443794f98ad4d9ab3e9d26987dea994.tar.bz2 mana-eda60e15c443794f98ad4d9ab3e9d26987dea994.tar.xz mana-eda60e15c443794f98ad4d9ab3e9d26987dea994.zip |
Made the Setup window key work during login sequence
Closes #100
-rw-r--r-- | src/client.cpp | 14 | ||||
-rw-r--r-- | src/game.cpp | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp index 99c5bbcf..f0254d50 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -468,6 +468,20 @@ int Client::exec() break; } break; + + case SDL_KEYDOWN: + if (keyboard.isEnabled()) + { + const int tKey = keyboard.getKeyIndex(event.key.keysym.sym); + if (tKey == KeyboardConfig::KEY_WINDOW_SETUP) + { + setupWindow->setVisible(!setupWindow->isVisible()); + if (setupWindow->isVisible()) + setupWindow->requestMoveToTop(); + continue; + } + } + break; } guiInput->pushInput(event); diff --git a/src/game.cpp b/src/game.cpp index 9657bee7..a6764fcf 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -611,8 +611,6 @@ void Game::handleInput() if (keyboard.isEnabled() && !chatWindow->isInputFocused() && !NpcDialog::isAnyInputFocused() && !InventoryWindow::isAnyInputFocused()) { - const int tKey = keyboard.getKeyIndex(event.key.keysym.sym); - // Do not activate shortcuts if tradewindow is visible if (!tradeWindow->isVisible() && !setupWindow->isVisible()) { |