from Discord chat with Ranietz re: Studio HTML Export's Fullscreen bug:
Quote: "the Fullscreen paramater in SetWindowSize( ) can be set to enter FS Mode in HTML."
Usage:
...
FS = -1
do
If GetRawKeyPressed(112) // [F1] Key
FS = -FS
If FS = 1 then SetWindowSize( 1024, 768, 1 ) else SetWindowSize( 1024, 768, 0 )
UpdateDeviceSize(1024,768)
EndIf
...
loop
the .js Fullscreen link in the Studio-generated HTML file should be removed a la
Demo at itch.io
SetErrorMode(2)
#CONSTANT Platform$ = GetDeviceBaseName()
// set window properties
SetWindowTitle( "Studio Fullscreen" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )
FS = -1
RED = MakeColor(255,0,0)
do
If GetRawKeyPressed(112) // [F1] Key
FS = -FS
If FS = 1 then SetWindowSize( 1024, 768, 1 ) else SetWindowSize( 1024, 768, 0 )
UpdateDeviceSize(1024,768)
EndIf
DrawBox(0,0,1023,767,Red, Red, Red, Red, 0)
Print( "[F1] Toggle Fullscreen" )
Print( "Window: " + STR(GetWindowWidth()) + "x" + STR(GetWindowHeight()))
Print( "Base: " + STR(GetDeviceWidth()) + "x" + STR(GetDeviceHeight()) )
Print( "Max: " + STR(GetMaxDeviceWidth()) + "x" + STR(GetMaxDeviceHeight()) )
Sync()
loop
note potential issues when scaling via browser @ different modes (FS/Non-FS); can return to original values but, for example, i scale browser
and Windows™ so this is not completely Responsive.