@@ -35,31 +35,27 @@ impl Plugin for TimingPlugin {
35
35
. add_event :: < SeekEvent > ( )
36
36
. add_systems ( Update , space_pause_resume_control. run_if ( project_loaded ( ) ) )
37
37
. add_systems ( Update , progress_control_system. run_if ( project_loaded ( ) ) )
38
- . add_systems ( Update , scroll_progress_control_system. run_if ( project_loaded ( ) ) ) ;
38
+ . add_systems (
39
+ Update ,
40
+ scroll_progress_control_system. run_if ( project_loaded ( ) ) ,
41
+ ) ;
39
42
}
40
43
}
41
44
42
- /// Use ArrowLeft and ArrowRight to control the progress. Holding Control will seek faster and holding Alt will seek slower
45
+ /// Use ArrowLeft and ArrowRight to control the progress
43
46
fn progress_control_system (
44
47
keyboard : Res < ButtonInput < KeyCode > > ,
45
48
mut events : EventWriter < SeekEvent > ,
46
49
) {
47
- let mut factor = 1.0 ;
48
- if keyboard. pressed ( KeyCode :: ControlLeft ) {
49
- factor *= 2.0 ;
50
- }
51
- if keyboard. pressed ( KeyCode :: AltLeft ) {
52
- factor /= 2.0 ;
53
- }
54
50
if keyboard. pressed ( KeyCode :: ArrowLeft ) {
55
- events. send ( SeekEvent ( -0.02 * factor ) ) ;
51
+ events. send ( SeekEvent ( -0.02 ) ) ;
56
52
}
57
53
if keyboard. pressed ( KeyCode :: ArrowRight ) {
58
- events. send ( SeekEvent ( 0.02 * factor ) ) ;
54
+ events. send ( SeekEvent ( 0.02 ) ) ;
59
55
}
60
56
}
61
57
62
- /// Scroll on the timeline to control the progress. Holding Control will seek faster and holding Alt will seek slower
58
+ /// Scroll on the timeline to control the progress
63
59
fn scroll_progress_control_system (
64
60
mut wheel_events : EventReader < MouseWheel > ,
65
61
mut events : EventWriter < SeekEvent > ,
0 commit comments