From 502a34bf64395010eea88fdf845016bdd5b3f36f Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 5 Mar 2021 00:55:57 -0800 Subject: [PATCH] Add previous song option to editor music screen This is just a small quality-of-life feature - it's annoying to have to press ACTION 15 times in order to cycle back through to the previous song. --- desktop_version/src/Game.cpp | 1 + desktop_version/src/editor.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Game.cpp b/desktop_version/src/Game.cpp index 868a9170..ec11e4c8 100644 --- a/desktop_version/src/Game.cpp +++ b/desktop_version/src/Game.cpp @@ -6417,6 +6417,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ ) break; case Menu::ed_music: option("next song"); + option("previous song"); option("back"); menuyoff = 16; maxspacing = 15; diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 84e9e23a..43ecc3de 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -3726,8 +3726,17 @@ static void editormenuactionpress() switch (game.currentmenuoption) { case 0: - ed.levmusic++; - if(ed.levmusic==16) ed.levmusic=0; + case 1: + switch (game.currentmenuoption) + { + case 0: + ed.levmusic++; + break; + case 1: + ed.levmusic--; + break; + } + ed.levmusic = (ed.levmusic % 16 + 16) % 16; if(ed.levmusic>0) { music.play(ed.levmusic); @@ -3738,7 +3747,7 @@ static void editormenuactionpress() } music.playef(11); break; - case 1: + case 2: music.playef(11); music.fadeout(); game.returnmenu();