Revert "reset is_dragging on mouse release"

This reverts commit ff5e51cf6f00848d93aa3ce0bab16602fea7a319.
pull/34814/head
Cameron Clough 4 months ago
parent d8aa347894
commit 633b37e6bf
  1. 2
      system/ui/lib/scroll_panel.py

@ -40,6 +40,7 @@ class GuiScrollPanel:
self._last_mouse_y = mouse_pos.y self._last_mouse_y = mouse_pos.y
self._start_mouse_y = mouse_pos.y # Record starting position self._start_mouse_y = mouse_pos.y # Record starting position
self._velocity_y = 0.0 # Reset velocity when drag starts self._velocity_y = 0.0 # Reset velocity when drag starts
self._is_dragging = False # Reset dragging flag
if self._scroll_state != ScrollState.IDLE: if self._scroll_state != ScrollState.IDLE:
if rl.is_mouse_button_down(rl.MouseButton.MOUSE_BUTTON_LEFT): if rl.is_mouse_button_down(rl.MouseButton.MOUSE_BUTTON_LEFT):
@ -59,7 +60,6 @@ class GuiScrollPanel:
self._velocity_y = delta_y # Update velocity during drag self._velocity_y = delta_y # Update velocity during drag
elif rl.is_mouse_button_released(rl.MouseButton.MOUSE_BUTTON_LEFT): elif rl.is_mouse_button_released(rl.MouseButton.MOUSE_BUTTON_LEFT):
self._scroll_state = ScrollState.IDLE self._scroll_state = ScrollState.IDLE
self._is_dragging = False
# Handle mouse wheel scrolling # Handle mouse wheel scrolling
wheel_move = rl.get_mouse_wheel_move() wheel_move = rl.get_mouse_wheel_move()

Loading…
Cancel
Save