File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,10 @@ fn handle_keyboard_inputs(
212212 crate :: viewer:: control:: ControlView :: play_or_stop ( & mut midi_state, & mut play_control_evts) ;
213213 } else if keyboard_input. just_released ( KeyCode :: Backslash ) {
214214 crate :: viewer:: control:: ControlView :: toggle_layout_mode ( & mut app_state, & mut settings, & mut theme) ;
215+ } else if keyboard_input. just_released ( KeyCode :: M ) {
216+ crate :: viewer:: control:: ControlView :: toggle_show_melody_syllable ( & mut app_state, & mut settings, & mut theme) ;
217+ } else if keyboard_input. just_released ( KeyCode :: F ) {
218+ crate :: viewer:: control:: ControlView :: toggle_always_show_fret ( & mut app_state, & mut settings, & mut theme) ;
215219 }
216220}
217221
Original file line number Diff line number Diff line change @@ -224,6 +224,22 @@ impl ControlView {
224224 }
225225 Self :: reload_tab ( state, theme) ;
226226 }
227+ pub fn toggle_show_melody_syllable (
228+ state : & mut NotationAppState ,
229+ settings : & mut NotationSettings ,
230+ theme : & mut NotationTheme ,
231+ ) {
232+ settings. show_melody_syllable = !settings. show_melody_syllable ;
233+ Self :: reload_tab ( state, theme) ;
234+ }
235+ pub fn toggle_always_show_fret (
236+ state : & mut NotationAppState ,
237+ settings : & mut NotationSettings ,
238+ theme : & mut NotationTheme ,
239+ ) {
240+ settings. always_show_fret = !settings. always_show_fret ;
241+ Self :: reload_tab ( state, theme) ;
242+ }
227243 pub fn overrides_ui (
228244 ui : & mut Ui ,
229245 settings : & mut NotationSettings ,
You can’t perform that action at this time.
0 commit comments