From 3ec55648454d421b3a33602ed720f618afa513cb Mon Sep 17 00:00:00 2001 From: "Sergei Ivanov (Districh)" Date: Sun, 19 Jan 2025 21:22:14 +0300 Subject: [PATCH] Address comment --- src/fheroes2/gui/interface_buttons.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fheroes2/gui/interface_buttons.cpp b/src/fheroes2/gui/interface_buttons.cpp index 02219dbc0a..4bfbb108be 100644 --- a/src/fheroes2/gui/interface_buttons.cpp +++ b/src/fheroes2/gui/interface_buttons.cpp @@ -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(); }