Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Fix undesired scrollbars on shell files #4104

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

jspast
Copy link
Contributor

@jspast jspast commented Jun 25, 2024

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 before

minshell.html after:
minshell html after

shell.html before:
shell html before

shell.html after:
shell html after

@raysan5 raysan5 merged commit 37205bb into raysan5:master Jun 25, 2024
@raysan5
Copy link
Owner

raysan5 commented Jun 25, 2024

@jspast thanks for the review! I just fixed it for one of my projects today! Still wondering the root of this issue, why does it happen?

@jspast
Copy link
Contributor Author

jspast commented Jun 25, 2024

Thanks @raysan5 for the merge! To be completely honest, I am also not sure! I was just able to find a solution and thought it was a good idea to help people like me who have no experience with web development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants