@@ -60,10 +60,7 @@ fn main() {
60
60
. add_plugins ( FrameTimeDiagnosticsPlugin :: default ( ) )
61
61
. add_plugins ( AssetsPlugin )
62
62
. 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)
67
64
. add_systems ( Startup , setup_egui_font_system)
68
65
. add_systems ( Startup , setup_plugin)
69
66
. add_systems ( Startup , setup_chart_plugin)
@@ -79,7 +76,6 @@ fn main() {
79
76
)
80
77
. chain ( ) ,
81
78
)
82
- // .add_systems(Update, update_judgeline_system)
83
79
. add_systems ( Update , ( compute_line_system, update_line_system) )
84
80
. add_systems (
85
81
Update ,
@@ -97,6 +93,10 @@ fn main() {
97
93
. run ( ) ;
98
94
}
99
95
96
+ fn setup_egui_image_loader_system ( mut contexts : bevy_egui:: EguiContexts ) {
97
+ egui_extras:: install_image_loaders ( contexts. ctx_mut ( ) ) ;
98
+ }
99
+
100
100
fn setup_egui_font_system ( mut contexts : bevy_egui:: EguiContexts , working_directory : Res < WorkingDirectory > ) {
101
101
let ctx = contexts. ctx_mut ( ) ;
102
102
@@ -520,7 +520,6 @@ fn distance_at(speed_events: &Vec<&SpeedEvent>, time: f32) -> f32 {
520
520
if event. start_time > t {
521
521
let delta = ( ( event. start_time . min ( time) - t) * v) . max ( 0.0 ) ;
522
522
area += delta;
523
- // t = event.start_time;
524
523
}
525
524
526
525
let time_delta = ( time. min ( event. end_time ) - event. start_time ) . max ( 0.0 ) ;
0 commit comments