Switch to WheelHiRes. Add horizontal scrolling (#171)

* Switch to HiResScroll. Add horizontal scrolling

* Fix OpenVR compilation for horizontal scrolling

* fix OpenXR scroll using x axis for both scroll axes
This commit is contained in:
AdiMCS
2025-03-09 10:20:10 -07:00
committed by GitHub
parent 36074307b7
commit b0883e81bf
14 changed files with 77 additions and 60 deletions

View File

@@ -153,13 +153,13 @@ impl InteractionHandler for WayVRInteractionHandler {
}
}
fn on_scroll(&mut self, _app: &mut state::AppState, _hit: &input::PointerHit, delta: f32) {
fn on_scroll(&mut self, _app: &mut state::AppState, _hit: &input::PointerHit, delta_y: f32, delta_x: f32) {
let ctx = self.context.borrow();
ctx.wayvr
.borrow_mut()
.data
.state
.send_mouse_scroll(ctx.display, delta);
.send_mouse_scroll(ctx.display, delta_y, delta_x);
}
}