From d8aa3478945e079844d1dfe32817cf59b7394d0b Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Fri, 25 Apr 2025 20:58:36 +0100 Subject: [PATCH] reset is_dragging on mouse release --- system/ui/lib/scroll_panel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/ui/lib/scroll_panel.py b/system/ui/lib/scroll_panel.py index 7dc2fdb917..9f479cd5ee 100644 --- a/system/ui/lib/scroll_panel.py +++ b/system/ui/lib/scroll_panel.py @@ -40,7 +40,6 @@ class GuiScrollPanel: self._last_mouse_y = mouse_pos.y self._start_mouse_y = mouse_pos.y # Record starting position self._velocity_y = 0.0 # Reset velocity when drag starts - self._is_dragging = False # Reset dragging flag if self._scroll_state != ScrollState.IDLE: if rl.is_mouse_button_down(rl.MouseButton.MOUSE_BUTTON_LEFT): @@ -60,6 +59,7 @@ class GuiScrollPanel: self._velocity_y = delta_y # Update velocity during drag elif rl.is_mouse_button_released(rl.MouseButton.MOUSE_BUTTON_LEFT): self._scroll_state = ScrollState.IDLE + self._is_dragging = False # Handle mouse wheel scrolling wheel_move = rl.get_mouse_wheel_move()