[web] Fix undesired scrollbars on shell files #4104
Merged
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.
While testing my game, I noticed scrollbars were visible when compiling with minshell.html. First, I thought my RenderTexture was not scaling correctly on the web. After some tests, I discovered that a small change to the minshell.html file completely fixes the problem.
The issue has already been described here.
And even the solution has already been described here but not merged.
I also added
background-color: black
to the body so that areas not rendered (happens when resizing the window or when not scaling the game) are black instead of white, which I assume should be the default.Then I checked shell.html and found that it always shows a horizontal scrollbar, even with no RenderTexture scaling. This can also be fixed directly on the shell.html file.
So hopefully these changes make the shell files behave as expected.
Tests
(For minshell.html I used a modified version of core_basic_window that scales using a RenderTexture)
minshell.html before:
minshell.html after:
shell.html before:
shell.html after: