Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
snendev committed Mar 1, 2024
1 parent ceaf1a7 commit 0dff479
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
8 changes: 6 additions & 2 deletions examples/gamepad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
}
}
Expand Down
41 changes: 41 additions & 0 deletions git
Original file line number Diff line number Diff line change
@@ -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 };
}
}
8 changes: 4 additions & 4 deletions src/input_playback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -212,7 +212,7 @@ fn send_playback_events(
}
AppExit => {
input_writers.app_exit.send_default();
},
}
};
}
}
Expand Down

0 comments on commit 0dff479

Please sign in to comment.