mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-25 21:38:59 +02:00
Block turn end button after player ends turn
This commit is contained in:
parent
64c43c91dc
commit
56074e18a9
@ -71,7 +71,7 @@ std::vector<AdventureMapShortcutState> AdventureMapShortcuts::getShortcuts()
|
||||
{ EShortcut::ADVENTURE_GAME_OPTIONS, optionInMapView(), [this]() { this->adventureOptions(); } },
|
||||
{ EShortcut::GLOBAL_OPTIONS, optionInMapView(), [this]() { this->systemOptions(); } },
|
||||
{ EShortcut::ADVENTURE_NEXT_HERO, optionHasNextHero(), [this]() { this->nextHero(); } },
|
||||
{ EShortcut::GAME_END_TURN, optionInMapView(), [this]() { this->endTurn(); } },
|
||||
{ EShortcut::GAME_END_TURN, optionCanEndTurn(), [this]() { this->endTurn(); } },
|
||||
{ EShortcut::ADVENTURE_THIEVES_GUILD, optionInMapView(), [this]() { this->showThievesGuild(); } },
|
||||
{ EShortcut::ADVENTURE_VIEW_SCENARIO, optionInMapView(), [this]() { this->showScenarioInfo(); } },
|
||||
{ EShortcut::GAME_SAVE_GAME, optionInMapView(), [this]() { this->saveGame(); } },
|
||||
@ -453,6 +453,11 @@ bool AdventureMapShortcuts::optionHasNextHero()
|
||||
return optionInMapView() && nextSuitableHero != nullptr;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionCanEndTurn()
|
||||
{
|
||||
return optionInMapView() && LOCPLINT->makingTurn;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionSpellcasting()
|
||||
{
|
||||
return state == EAdventureState::CASTING_SPELL;
|
||||
|
@ -78,6 +78,7 @@ public:
|
||||
bool optionHeroCanMove();
|
||||
bool optionHasNextHero();
|
||||
bool optionCanVisitObject();
|
||||
bool optionCanEndTurn();
|
||||
bool optionSpellcasting();
|
||||
bool optionInMapView();
|
||||
bool optionInWorldView();
|
||||
|
Loading…
x
Reference in New Issue
Block a user