Skip to content

feat: expose MouseWheel::touch_phase#23897

Merged
mockersf merged 1 commit into
bevyengine:mainfrom
chompaa:touch-phase
Apr 20, 2026
Merged

feat: expose MouseWheel::touch_phase#23897
mockersf merged 1 commit into
bevyengine:mainfrom
chompaa:touch-phase

Conversation

@chompaa

@chompaa chompaa commented Apr 20, 2026

Copy link
Copy Markdown
Member

Objective

  • winit::event::WindowEvent::MouseWheel::phase is not exposed throughbevy_input::mouse::MouseWheel.
  • I hit this when mapping bevy mouse wheel events to egui, which expects a touch phase parameter.

Solution

  • Add bevy_input::mouse::MouseWheel::phase.
  • For completeness, also add bevy_picking::pointer::PointerAction::Scroll::phase and bevy_picking::events::Scroll::phase.

Testing

  • cargo run --example mouse_input_events with a touch pad and without.
    • Observed the Started, Moved and Ended phases showing up properly.

Future Work

The gesture types should also have TouchPhase exposed on them, but doing so turns this PR quite a bit larger, so I've left them out.

@chompaa chompaa added C-Feature A new feature, making something new possible A-Input Player input via keyboard, mouse, gamepad, and more D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Apr 20, 2026
@chompaa chompaa added this to the 0.20 milestone Apr 20, 2026
@mockersf mockersf added this pull request to the merge queue Apr 20, 2026
Merged via the queue into bevyengine:main with commit 4a0924e Apr 20, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Input Player input via keyboard, mouse, gamepad, and more C-Feature A new feature, making something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants