diff --git a/examples/gamepad.rs b/examples/gamepad.rs index 9d62e9e..6f470cc 100644 --- a/examples/gamepad.rs +++ b/examples/gamepad.rs @@ -182,8 +182,12 @@ mod gamepad_viewer_example { triangle: meshes .add(RegularPolygon::new(BUTTON_RADIUS, 3).mesh()) .into(), - start_pause: meshes.add(Rectangle::new(START_SIZE.x, START_SIZE.y).mesh()).into(), - trigger: meshes.add(Rectangle::new(TRIGGER_SIZE.x, TRIGGER_SIZE.y).mesh()).into(), + start_pause: meshes + .add(Rectangle::new(START_SIZE.x, START_SIZE.y).mesh()) + .into(), + trigger: meshes + .add(Rectangle::new(TRIGGER_SIZE.x, TRIGGER_SIZE.y).mesh()) + .into(), } } } diff --git a/git b/git new file mode 100644 index 0000000..21055ef --- /dev/null +++ b/git @@ -0,0 +1,41 @@ +Diff in /home/snen/dev/github/leafwing_input_playback/examples/gamepad.rs at line 182: + triangle: meshes + .add(RegularPolygon::new(BUTTON_RADIUS, 3).mesh()) + .into(), +- start_pause: meshes.add(Rectangle::new(START_SIZE.x, START_SIZE.y).mesh()).into(), +(B- trigger: meshes.add(Rectangle::new(TRIGGER_SIZE.x, TRIGGER_SIZE.y).mesh()).into(), +(B+ start_pause: meshes +(B+ .add(Rectangle::new(START_SIZE.x, START_SIZE.y).mesh()) +(B+ .into(), +(B+ trigger: meshes +(B+ .add(Rectangle::new(TRIGGER_SIZE.x, TRIGGER_SIZE.y).mesh()) +(B+ .into(), +(B } + } + } +Diff in /home/snen/dev/github/leafwing_input_playback/src/input_playback.rs at line 189: + match timestamped_input_event.input_event { + Keyboard(e) => { + input_writers.keyboard_input.send(e); +- }, +(B+ } +(B MouseButton(e) => { + input_writers.mouse_button_input.send(e); +- }, +(B+ } +(B MouseWheel(e) => { + input_writers.mouse_wheel.send(e); +- }, +(B+ } +(B // Window events MUST update the `Window` struct itself + // BLOCKED: https://github.com/bevyengine/bevy/issues/6163 + CursorMoved(e) => { +Diff in /home/snen/dev/github/leafwing_input_playback/src/input_playback.rs at line 212: + } + AppExit => { + input_writers.app_exit.send_default(); +- }, +(B+ } +(B }; + } + } diff --git a/src/input_playback.rs b/src/input_playback.rs index e0c3e45..8b3ed6e 100644 --- a/src/input_playback.rs +++ b/src/input_playback.rs @@ -189,13 +189,13 @@ fn send_playback_events( match timestamped_input_event.input_event { Keyboard(e) => { input_writers.keyboard_input.send(e); - }, + } MouseButton(e) => { input_writers.mouse_button_input.send(e); - }, + } MouseWheel(e) => { input_writers.mouse_wheel.send(e); - }, + } // Window events MUST update the `Window` struct itself // BLOCKED: https://github.com/bevyengine/bevy/issues/6163 CursorMoved(e) => { @@ -212,7 +212,7 @@ fn send_playback_events( } AppExit => { input_writers.app_exit.send_default(); - }, + } }; } }