Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Districh-ru committed Jan 19, 2025
1 parent e0b74ab commit 3ec5564
Showing 1 changed file with 2 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 @@ -180,9 +180,9 @@ fheroes2::GameMode Interface::ButtonsPanel::queueEventProcessing()
}
// The 'MouseLongPressLeft()' for '_heroMovementRect' should be called only if current hero
// has valid path not to trigger the '_mouseButtonLongPressDelay'.
// The inlined 'isMouseLeftButtonPressed()' method is called not to call 'isValidForMovement()'
// The inlined 'isMouseLeftButtonPressedInArea()' method is called not to call 'isValidForMovement()'
// method every time this button is enabled.
else if ( _buttonHeroMovement.isEnabled() && le.isMouseLeftButtonPressed() && GetFocusHeroes()->GetPath().isValidForMovement()
else if ( _buttonHeroMovement.isEnabled() && le.isMouseLeftButtonPressedInArea( _heroMovementRect ) && GetFocusHeroes()->GetPath().isValidForMovement()
&& le.MouseLongPressLeft( _heroMovementRect ) ) {
_interface.EventResetHeroPath();
}
Expand Down

0 comments on commit 3ec5564

Please sign in to comment.