Browse Source

Do not trigger multiple hotkeys when battle window wait for any key

Ivan Savenko 2 years ago
parent
commit
ecff5f3d12
2 changed files with 6 additions and 0 deletions
  1. 5 0
      client/battle/BattleWindow.cpp
  2. 1 0
      client/battle/BattleWindow.h

+ 5 - 0
client/battle/BattleWindow.cpp

@@ -186,6 +186,11 @@ void BattleWindow::deactivate()
 	LOCPLINT->cingconsole->deactivate();
 }
 
+bool BattleWindow::captureThisKey(EShortcut key)
+{
+	return owner.openingPlaying();
+}
+
 void BattleWindow::keyPressed(EShortcut key)
 {
 	if (owner.openingPlaying())

+ 1 - 0
client/battle/BattleWindow.h

@@ -85,6 +85,7 @@ public:
 	void activate() override;
 	void deactivate() override;
 	void keyPressed(EShortcut key) override;
+	bool captureThisKey(EShortcut key) override;
 	void clickRight(tribool down, bool previousState) override;
 	void show(SDL_Surface *to) override;
 	void showAll(SDL_Surface *to) override;