From 21b79c0b837a2f37f3ce82df3cd8ac6f4a2b7ab6 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Tue, 28 Nov 2023 04:30:29 -0500 Subject: [PATCH] bpm in playbar --- assets | 2 +- .../ui/debug/charting/ChartEditorState.hx | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/assets b/assets index 082a5df5b..f3e9cd835 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit 082a5df5bab669132f3b8f532b48be39c8f4fd43 +Subproject commit f3e9cd8355f20445fcad7030fdb6363a2325adb3 diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 4a8f22982..6f0e55fb7 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -2096,6 +2096,23 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState } }; + playbarBPM.onClick = _ -> { + if (FlxG.keys.pressed.CONTROL) + { + this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, true); + } + else + { + currentSongMetadata.timeChanges[0].bpm += 1; + refreshMetadataToolbox(); + } + } + + playbarBPM.onRightClick = _ -> { + currentSongMetadata.timeChanges[0].bpm -= 1; + refreshMetadataToolbox(); + } + // Add functionality to the menu items. // File @@ -2268,6 +2285,10 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState menubarLabelPlaybackSpeed.text = 'Playback Speed - ${pitchDisplay}x'; } + playbarDifficulty.onClick = _ -> { + this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, true); + } + menubarItemToggleToolboxDifficulty.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_DIFFICULTY_LAYOUT, event.value); menubarItemToggleToolboxMetadata.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_METADATA_LAYOUT, event.value); menubarItemToggleToolboxNotes.onChange = event -> this.setToolboxState(CHART_EDITOR_TOOLBOX_NOTEDATA_LAYOUT, event.value); @@ -3980,6 +4001,7 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState playbarNoteSnap.text = '1/${noteSnapQuant}'; playbarDifficulty.text = "Difficulty: " + selectedDifficulty.toTitleCase(); + playbarBPM.text = "BPM: " + currentSongMetadata.timeChanges[0].bpm; } function handlePlayhead():Void