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.
#13761 unfortunately introduced a visual regression of the gamebar:
Notice the misaligned scroll buttons.
Originally I only wanted to fix the regression, but I ended up rewriting the gamebar / the FSTK "buttonbar" instead. Improvements:
Instead of using an arbitrary value, the spacing between buttons is now calculated like CSS Flexbox with
justify-content: space-evenly;
would calculate it (i.e. there's the same amount of space at the start of the container, between the buttons and at the end of the container).The "previous" and "next" buttons now scroll by one page instead of one button. This fixes Improve main menu gamebar scrolling #11886. I'm aware that using a
scroll_container
has been proposed as an alternative solution, but I find it easier not to lose orientation with a pagination in this case.Vertical buttonbars, an unused feature, have been removed.
Formspec concatenation is done using
table.concat
instead of..
.Here are three screenshots of the rewritten gamebar:
With multiple pages:
With one page:
To do
This PR is a Ready for Review.
How to test
Look at the gamebar. Verify that it looks good, both when all games fit on one page and when there are multiple pages. Verify that the gamebar works as expected.