Godot Version
v4.8.beta1.official [4d10419ca] - CachyOS KDE Plasma Linux x86_64 Mini PC
Question
Hi,
How is full screen mode on a super wide computer monitor going to work in Godot v4.8+?
We have no idea on how to do the above properly.
Anyone have any suggestions?
Let us know, thanks!
Savant Savior
Use anchors, margins, and container nodes.
Hard to say specifically, screen size is something you may have to target, maybe even use scripts and specialized assets to support a wide variety of screens such as portrait and ultra-wide.
Hi,
Thanks for the info…
Would the below GDScript code work 100% of the time to find 16:9 monitor resolutions?
Let us know, thank you!
Savant Savior
VisualsCore.MonitorScreenSize = DisplayServer.screen_get_size(0)
print( “W=”+str(VisualsCore.MonitorScreenSize.x)+“/H=”+str(VisualsCore.MonitorScreenSize.y) )
var ratio: float = ( float(VisualsCore.MonitorScreenSize.x) / float(VisualsCore.MonitorScreenSize.y) )
var sixteenByNineRatio: float = 1.77777777777778
print( “r=”+str(ratio) )
if is_equal_approx(ratio, sixteenByNineRatio):
VisualsCore.KeepAspectRatio = false
print(“false”)
else:
VisualsCore.KeepAspectRatio = true
print(“true”)`
You should be checking the window size, it may be smaller (or larger) than the screen size.
Checking if you are near a preferred ratio doesn’t seem very helpful, but I don’t know what you intend to do with KeepAspectRatio
I have 16:9 and it works normally, but it depends entirely on your anchors and objects placement, not the screen ratio, if you placed a simple rectangular ui in the middle on 16:9 it will be stretched across the monitor more than on your laptop
best thing you can do is ask your friend who have larger screen if everything is OK and do trial&error, you can also allow UI customization or add UI modes for larger screens if your UI can’t be saved with stretching