Skip to content

Commit

Permalink
Update Move button logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Districh-ru committed Jan 16, 2025
1 parent 479835f commit 65d7ace
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fheroes2/gui/interface_buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ void Interface::ButtonsPanel::_setButtonStatus()
_buttonHeroMovement.enable();
}
else if ( currentHero && currentHero->GetPath().isValidForMovement() ) {
_buttonHeroMovement.setICNIndexes( 2, 3 );
_buttonHeroMovement.disable();
_buttonHeroMovement.setICNIndexes( 18, 19 );
_buttonHeroMovement.enable();
}
else {
_buttonHeroMovement.setICNIndexes( 18, 19 );
Expand Down
3 changes: 3 additions & 0 deletions src/fheroes2/gui/interface_events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ fheroes2::GameMode Interface::AdventureMap::EventHeroMovement()
else if ( MP2::isInGameActionObject( hero->getObjectTypeUnderHero(), hero->isShipMaster() ) ) {
return EventDefaultAction();
}
else if ( hero->GetPath().isValidForMovement() ) {
EventResetHeroPath();
}
}

return fheroes2::GameMode::CANCEL;
Expand Down

0 comments on commit 65d7ace

Please sign in to comment.