1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Battleintro: Skip with mouse button

This commit is contained in:
Michael 2023-07-15 21:18:04 +02:00 committed by GitHub
parent a4ba5a9b65
commit 4e242f98fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View File

@ -86,7 +86,7 @@ BattleWindow::BattleWindow(BattleInterface & owner):
else
tacticPhaseEnded();
addUsedEvents(KEYBOARD);
addUsedEvents(LCLICK | KEYBOARD);
}
void BattleWindow::createQueue()
@ -204,6 +204,16 @@ void BattleWindow::keyPressed(EShortcut key)
InterfaceObjectConfigurable::keyPressed(key);
}
void BattleWindow::clickPressed(const Point & cursorPosition)
{
if (owner.openingPlaying())
{
owner.openingEnd();
return;
}
InterfaceObjectConfigurable::clickPressed(cursorPosition);
}
void BattleWindow::tacticPhaseStarted()
{
auto menuBattle = widget<CIntObject>("menuBattle");

View File

@ -86,6 +86,7 @@ public:
void deactivate() override;
void keyPressed(EShortcut key) override;
bool captureThisKey(EShortcut key) override;
void clickPressed(const Point & cursorPosition) override;
void show(Canvas & to) override;
void showAll(Canvas & to) override;