-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Is your feature request related to a problem? Please describe.
egui::Scene
looks good for making an area pannable and zoomable, but by default, regular scrolling results in panning up and down. My use case would benefit more from dedicating the mouse wheel to zoom, kind of like a maps viewer interface.
Describe the solution you'd like
A modifier on egui::Scene
like .zoom_without_ctrl(true)
or .mouse_wheel_zooms(true)
. When set, scrolling acts as if ctrl is always held. Maybe it could be flipped such that holding ctrl now pans up and down. Maybe that could be a separate setting. Or maybe there could be a mechanism where the user provides |mods| if mods.command { Scroll } else { Zoom }
Describe alternatives you've considered
I guess I could find a hacky workaround?
Additional context
I'm only considering mouse inputs here. I'm not sure how trackpad gestures work. I'd imagine two-finger panning would pan, and pinch gestures would zoom, and would not be affected by this setting.