Repository navigation
add world list screen - #556
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Screen::WorldListplusui/menu/worlds.rs, checked againstSelectWorldScreenandWorldSelectionList.The scrollbar draw and the wheel clamp were private helpers in the friends screen, with a near copy open coded in the server list. They move into shared helpers along with the nine slice wrapper they depend on, rather than gaining a third copy. The server list's inline copy is left alone as a separate cleanup. The search box hint is shared with the resource pack screen the same way.
World geometry lives in the new module rather than growing the shared constant block, which is sized for the server list: row 270 against 305, header 49 against 33. Entry height 36 does match and is reused. The footer grid uses vanilla's 8 unit column spacing with the shared 4 between rows.
Row content is display name, then folder and short local date time, then the info line from
LevelSummary.createInfo. A world that has never been opened shows the folder alone, as vanilla does for an unset timestamp. Hardcore renders red in place of the game mode. Hover dims the icon square only; selection outlines the whole row.Search filters case insensitively on display name or folder. Selection keys on the folder name, not a row index, because filtering rebuilds rows every frame and an index would reselect a different world as you type.
Play and Re-Create ship disabled with tooltips. Tooltips do their own hit test, since the shared button helper folds the enabled flag into its return value.
Enables Singleplayer on both title screens. Empty saves show a plain empty list here; jumping straight to the create screen lands with that screen.