-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[rcore] Feature request/discussion: MaximizeWindow() on HTML5 to maximize the canvas to fill the browser viewport? #4394
Comments
I'll have to try it out first. I'll try it tomorrow. |
I agree. It is just that I did not notice because I was using the 3D camera. The behaviour of MaximizeWindow() should be consistent across platforms.
I think the ability to maximize a window is useful. It is a bit less attractive as a feature to me now because disabling the margins on body and canvas elements is an extra thing to do. The other solution would be to have a flag/mode for raylib, where InitWindow does not change the width and height of the canvas so the canvas can be layouted statically and maximized using CSS. This would have the advantage of allowing a raylib app be in a blog post or in a html table or something. The disadvantage of this would be that it is not possible to maximize restore the canvas during the runtime of the raylib app.
PS: |
Makes sense now. In my weird personal use of the english language the word "tab" means a navigational element at the top not the document view area below it. Maybe you can argue that a tab is actually the size of the navigational element plus the document area, so I guess the tab is larger than the view area as it surrounds it. Actually they are inspired by tabs in filing cabinets which stick to the documents, you see the size of the tab is the small thing that sticks out plus the bit that sticks to the paper card. You see I would have called it innerWidth or viewportWidth. But you see I am overthinking things about a detail that does not matter. |
Currently calling MaximizeWindow() on HTML5/WASM does nothing but print a message to the console:
I want maximize window to maximize the canvas to fill the viewport of the browser. Note that this is different from fullscreen which also hides the browser chrome like the Navigation bar etc..
I want something like this in rcore_web.c:
Or alternatively an option that disables canvas sizing on InitWindow so the canvas can be layouted using CSS in the shell.html file.
See also: https://www.reddit.com/r/raylib/comments/1g4gg27/raylib_wasm_how_to_resize_the_canvas_to_fill_the/
If this is something you do not want to support you can close this issue.
The text was updated successfully, but these errors were encountered: