If I compile my game to HTML5, how would I get the size of the iFrame I'm putting it in?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By neoxid501

As a more specific case, I’m trying to make a game for HTML5 and I just want it to scale to the iFrame that itch io puts it in.

When I use OS.window_size it gives me the dimensions of my screen. Now understandably I can just scale the game manually to the set size of the iFrame but I would prefer to have it done dynamically. Thanks!

:bust_in_silhouette: Reply From: eska

Just call OS.set_window_maximized(true)


neoxid501 | 2018-03-06 18:03