-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
approvedA feature that has been approvedA feature that has been approvedfeatNew feature or requestNew feature or request
Description
Summary
Add .no_drag_scroll() to OverflowBuilder to disable mouse drag scrolling on scroll containers while keeping touch drag and scroll wheel scrolling.
Motivation
Drag scrolling on overflow containers is currently always enabled. On desktop, this can interfere with expected mouse interactions (selecting content, clicking elements during accidental micro-drags).
Proposed API
ui.element()
.overflow(|o| o.scroll_y().no_drag_scroll())
.children(|ui| {});When .no_drag_scroll() is set:
- Mouse drag: does nothing (no drag scrolling)
- Touch drag: still scrolls
- Scroll wheel: still scrolls
Behavior
- Touch detection uses macroquad's
touches()function. Iftouches()is non-empty during a press, it's touch input and drag scrolling still works. .no_drag_scroll()only affects mouse drag scrolling. Scroll wheel and touch-based scrolling are unaffected.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
approvedA feature that has been approvedA feature that has been approvedfeatNew feature or requestNew feature or request