bpm in playbar

This commit is contained in:
Cameron Taylor
2023-11-28 04:30:29 -05:00
parent d9d5744f1e
commit 21b79c0b83
2 changed files with 23 additions and 1 deletions
+1 -1
Submodule assets updated: 082a5df5ba...f3e9cd8355
@@ -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