Skip to content

Commit 75b84a9

Browse files
committed
clean up
1 parent 571408e commit 75b84a9

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/main.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,7 @@ fn main() {
6060
.add_plugins(FrameTimeDiagnosticsPlugin::default())
6161
.add_plugins(AssetsPlugin)
6262
.add_plugins(TranslationPlugin)
63-
.add_systems(Startup, |mut contexts: bevy_egui::EguiContexts| {
64-
let ctx = contexts.ctx_mut();
65-
egui_extras::install_image_loaders(ctx);
66-
})
63+
.add_systems(Startup, setup_egui_image_loader_system)
6764
.add_systems(Startup, setup_egui_font_system)
6865
.add_systems(Startup, setup_plugin)
6966
.add_systems(Startup, setup_chart_plugin)
@@ -79,7 +76,6 @@ fn main() {
7976
)
8077
.chain(),
8178
)
82-
// .add_systems(Update, update_judgeline_system)
8379
.add_systems(Update, (compute_line_system, update_line_system))
8480
.add_systems(
8581
Update,
@@ -97,6 +93,10 @@ fn main() {
9793
.run();
9894
}
9995

96+
fn setup_egui_image_loader_system(mut contexts: bevy_egui::EguiContexts) {
97+
egui_extras::install_image_loaders(contexts.ctx_mut());
98+
}
99+
100100
fn setup_egui_font_system(mut contexts: bevy_egui::EguiContexts, working_directory: Res<WorkingDirectory>) {
101101
let ctx = contexts.ctx_mut();
102102

@@ -520,7 +520,6 @@ fn distance_at(speed_events: &Vec<&SpeedEvent>, time: f32) -> f32 {
520520
if event.start_time > t {
521521
let delta = ((event.start_time.min(time) - t) * v).max(0.0);
522522
area += delta;
523-
// t = event.start_time;
524523
}
525524

526525
let time_delta = (time.min(event.end_time) - event.start_time).max(0.0);

0 commit comments

Comments
 (0)