feat: In-game folder manager #60
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit implements the basic functionality of the
Favorite folder management.Mainly changes is adding two menus:
FolderMenu: Allows you to manage the foldersSongMenu: Prints current selected song and allows you to add song to selected foldersUpstream Code Changes:
This commit only changes one line from upstream, which is only get the reference of the
MusicSelectorsinceSongMenuneeds to know which song is selected by user.Drop-in Compatibility:
This pr takes care about the drop-in compatibility but would still be breaking if one user has already defined their own folder the similar way but not followed the pattern
favorite & x != 0.Limitations:
Folders count cannot exceed to 25, because the
favoritefield is only 31 bits long.It's very dangerous to keep opening the mod menu while still letting the player have the control of the main game.
favoritefield itself seems to be volatile, user may find all their contents are missing after rebuilding the database.Alternatives:
There's another way to implement the missing
Favorite Folderfeature inbeatoraja: by mocking as a difficult table and be imported. This work has been done in some GUI/Web projects.TODO:
I haven't found a good solution to freeze user's input when adding a folder, it's very annoying when you typing a folder name while the game is still accepting your inputs. (
Beatorajaexposes a fieldenableinInputProcessorbut it doesn't lock every inputs, e.g. up and down)Should we delete all its content when deleting one folder?For now, it only deletes the folder itself. Then everything would come back if we add a folder with the same bit.
The default behavior of upstream is to add all difficult variants to one folder.For now, this commit only allows you add the selected one.
The default mechanism is very limited and hard to use, however if you delete them would cause upstream conflict.This commit doesn't implement any special treat for the default folders(which means you can easily delete them).I haven't find a better solution for this, maybe give a checkbox for player to judge whether use the legacy folder mechanism or not?
The edit button in folder menu haven't been implemented because of item4 and item2