podusowski / walkers

slippy map (openstreetmap) widget for egui
MIT License
156 stars 28 forks source link

Key and gesture bindings #134

Open noktoborus opened 9 months ago

noktoborus commented 9 months ago

What is the best way to add gestures to the map? I need the following:

  1. drag with two fingers
  2. drag with PointerButton::Secondary
  3. The ability to disable any of the gestures (already done in a clumsy way)
podusowski commented 9 months ago

I think I would just swap drag_gesture_enabled with some enum saying which buttons it should to. But I wonder, does egui even support two finger drag?

noktoborus commented 9 months ago

But I wonder, does egui even support two finger drag?

I didn't find the exact "two-fingers gesture" but egui has https://docs.rs/egui/latest/egui/enum.Event.html#variant.Touch think is not so hard implement drag Additionally, https://docs.rs/egui/latest/egui/struct.InputState.html#method.multi_touch is present