raylib scroll panel: check bounds (#36233)

check in bounds rect for scroll panel!!
pull/36121/merge
Shane Smiskol 2 days ago committed by GitHub
parent 29a6f0504a
commit b8ae62a0b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      system/ui/lib/scroll_panel.py

@ -77,6 +77,7 @@ class GuiScrollPanel:
def _handle_mouse_event(self, mouse_event: MouseEvent, bounds: rl.Rectangle, content: rl.Rectangle):
if self._scroll_state == ScrollState.IDLE:
if rl.check_collision_point_rec(mouse_event.pos, bounds):
if mouse_event.left_pressed:
self._start_mouse_y = mouse_event.pos.y
# Interrupt scrolling with new drag

Loading…
Cancel
Save