mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-31 22:05:10 +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::ADVENTURE_GAME_OPTIONS, optionInMapView(), [this]() { this->adventureOptions(); } },
|
||||||
{ EShortcut::GLOBAL_OPTIONS, optionInMapView(), [this]() { this->systemOptions(); } },
|
{ EShortcut::GLOBAL_OPTIONS, optionInMapView(), [this]() { this->systemOptions(); } },
|
||||||
{ EShortcut::ADVENTURE_NEXT_HERO, optionHasNextHero(), [this]() { this->nextHero(); } },
|
{ 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_THIEVES_GUILD, optionInMapView(), [this]() { this->showThievesGuild(); } },
|
||||||
{ EShortcut::ADVENTURE_VIEW_SCENARIO, optionInMapView(), [this]() { this->showScenarioInfo(); } },
|
{ EShortcut::ADVENTURE_VIEW_SCENARIO, optionInMapView(), [this]() { this->showScenarioInfo(); } },
|
||||||
{ EShortcut::GAME_SAVE_GAME, optionInMapView(), [this]() { this->saveGame(); } },
|
{ EShortcut::GAME_SAVE_GAME, optionInMapView(), [this]() { this->saveGame(); } },
|
||||||
@ -453,6 +453,11 @@ bool AdventureMapShortcuts::optionHasNextHero()
|
|||||||
return optionInMapView() && nextSuitableHero != nullptr;
|
return optionInMapView() && nextSuitableHero != nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AdventureMapShortcuts::optionCanEndTurn()
|
||||||
|
{
|
||||||
|
return optionInMapView() && LOCPLINT->makingTurn;
|
||||||
|
}
|
||||||
|
|
||||||
bool AdventureMapShortcuts::optionSpellcasting()
|
bool AdventureMapShortcuts::optionSpellcasting()
|
||||||
{
|
{
|
||||||
return state == EAdventureState::CASTING_SPELL;
|
return state == EAdventureState::CASTING_SPELL;
|
||||||
|
@ -78,6 +78,7 @@ public:
|
|||||||
bool optionHeroCanMove();
|
bool optionHeroCanMove();
|
||||||
bool optionHasNextHero();
|
bool optionHasNextHero();
|
||||||
bool optionCanVisitObject();
|
bool optionCanVisitObject();
|
||||||
|
bool optionCanEndTurn();
|
||||||
bool optionSpellcasting();
|
bool optionSpellcasting();
|
||||||
bool optionInMapView();
|
bool optionInMapView();
|
||||||
bool optionInWorldView();
|
bool optionInWorldView();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user