mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
fix button condition
This commit is contained in:
@@ -665,12 +665,6 @@ bool AdventureMapShortcuts::optionMarketplace()
|
||||
return false;
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionHeroGround()
|
||||
{
|
||||
const CGHeroInstance *hero = GAME->interface()->localState->getCurrentHero();
|
||||
return optionInMapView() && hero && !hero->inBoat();
|
||||
}
|
||||
|
||||
bool AdventureMapShortcuts::optionHeroBoat(EPathfindingLayer layer)
|
||||
{
|
||||
const CGHeroInstance *hero = GAME->interface()->localState->getCurrentHero();
|
||||
|
@@ -101,7 +101,6 @@ public:
|
||||
bool optionMapScrollingActive();
|
||||
bool optionMapViewActive();
|
||||
bool optionMarketplace();
|
||||
bool optionHeroGround();
|
||||
bool optionHeroBoat(EPathfindingLayer layer);
|
||||
bool optionHeroDig();
|
||||
|
||||
|
@@ -427,7 +427,7 @@ void AdventureMapWidget::updateActiveStateChildren(CIntObject * widget)
|
||||
container->setEnabled(shortcuts->optionHeroSleeping());
|
||||
|
||||
if (container->disableCondition == "heroGround")
|
||||
container->setEnabled(shortcuts->optionHeroGround());
|
||||
container->setEnabled(!shortcuts->optionHeroBoat(EPathfindingLayer::SAIL) && !shortcuts->optionHeroBoat(EPathfindingLayer::AIR));
|
||||
|
||||
if (container->disableCondition == "heroBoat")
|
||||
container->setEnabled(shortcuts->optionHeroBoat(EPathfindingLayer::SAIL));
|
||||
|
Reference in New Issue
Block a user