Added methods to delete songs and song groups.
- OsuGroupList.get().deleteSongGroup() will delete a song group from the list. - OsuGroupList.get().deleteSong() will delete an individual song from the list (must be expanded), and will delete the song group if there are no remaining songs in the group. - If possible, deleted beatmap files are moved to system trash (using JNA); otherwise, they are deleted immediately. This is done through Utils.deleteToTrash(). Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -396,6 +396,8 @@ public class SongMenu extends BasicGameState {
|
||||
|
||||
// search produced new list: re-initialize it
|
||||
startNode = focusNode = null;
|
||||
scoreMap = null;
|
||||
focusScores = null;
|
||||
if (OsuGroupList.get().size() > 0) {
|
||||
OsuGroupList.get().init();
|
||||
if (search.getText().isEmpty()) { // cleared search
|
||||
@@ -606,6 +608,8 @@ public class SongMenu extends BasicGameState {
|
||||
// reset state and node references
|
||||
MusicController.reset();
|
||||
startNode = focusNode = null;
|
||||
scoreMap = null;
|
||||
focusScores = null;
|
||||
oldFocusNode = null;
|
||||
randomStack = new Stack<SongNode>();
|
||||
songInfo = null;
|
||||
|
||||
Reference in New Issue
Block a user