diff --git a/app/src/data/KeybindData.ts b/app/src/data/KeybindData.ts index 1d79f9f9..34ba02ae 100644 --- a/app/src/data/KeybindData.ts +++ b/app/src/data/KeybindData.ts @@ -1423,4 +1423,38 @@ export const KEYBIND_DATA: { [key: string]: Keybind } = { disabled: app => !app.chartManager.chartView, callback: app => app.windowManager.openWindow(new NoteskinWindow(app)), }, + previousChart: { + label: "Previous chart", + combos: [{ key: "F5", mods: [] }], + disabled: app => !app.chartManager.chartView, + callback: app => { + if (!app.chartManager.loadedSM?.charts || !app.chartManager.loadedChart) + return + const charts = + app.chartManager.loadedSM?.charts[ + app.chartManager.loadedChart.gameType.id + ] + const curIndex = charts.indexOf(app.chartManager.loadedChart) + if (charts[curIndex - 1]) { + app.chartManager.loadChart(charts[curIndex - 1]) + } + }, + }, + nextChart: { + label: "Next chart", + combos: [{ key: "F6", mods: [] }], + disabled: app => !app.chartManager.chartView, + callback: app => { + if (!app.chartManager.loadedSM?.charts || !app.chartManager.loadedChart) + return + const charts = + app.chartManager.loadedSM?.charts[ + app.chartManager.loadedChart.gameType.id + ] + const curIndex = charts.indexOf(app.chartManager.loadedChart) + if (charts[curIndex + 1]) { + app.chartManager.loadChart(charts[curIndex + 1]) + } + }, + }, } diff --git a/app/src/data/MenubarData.ts b/app/src/data/MenubarData.ts index 38d724d3..a5a5d6e0 100644 --- a/app/src/data/MenubarData.ts +++ b/app/src/data/MenubarData.ts @@ -285,6 +285,17 @@ export const MENUBAR_DATA: { [key: string]: MenuMain } = { { type: "separator", }, + { + type: "selection", + id: "previousChart", + }, + { + type: "selection", + id: "nextChart", + }, + { + type: "separator", + }, { type: "selection", id: "songProperties",