Implemented various keyboard shortcuts.

- Main menu:
-- 'd': opens downloads menu
-- 'r': plays random track
- Song menu:
-- SHIFT+DEL: opens beatmap deletion menu

Other changes:
- In the main menu, tracks now play from the beginning instead of the preview time.
- Fixed "next page" icon sometimes showing in the downloads menu when a next page didn't exist.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-06 01:29:50 -05:00
parent 0a1b10fbdb
commit 81601d41aa
5 changed files with 69 additions and 42 deletions

View File

@@ -517,7 +517,7 @@ public class DownloadsMenu extends BasicGameState {
// initialize song list
OsuGroupList.get().reset();
OsuGroupList.get().init();
((SongMenu) game.getState(Opsu.STATE_SONGMENU)).setFocus(node, -1, true);
((SongMenu) game.getState(Opsu.STATE_SONGMENU)).setFocus(node, -1, true, true);
// send notification
UI.sendBarNotification((dirs.length == 1) ? "Imported 1 new song." :
@@ -544,7 +544,7 @@ public class DownloadsMenu extends BasicGameState {
SoundController.playSound(SoundEffect.MENUCLICK);
rankedOnly = !rankedOnly;
lastQuery = null;
pageDir = Page.CURRENT;
pageDir = Page.RESET;
resetSearchTimer();
return;
}