0 votes

I have been developing a card game and wanted to create menus styled after Windows 98. I have created the separators, the menu items, panels, all the stuff. and it all seems to work out fine when not zoomed in. After resizing the viewport and setting screen stretch the menu items overflow the container.

func set_window_size(size):
var tree = get_tree()
var viewport = tree.root

var scaled_size = size * scale_value

if !OS.window_fullscreen:
    OS.window_size = scaled_size

tree.set_screen_stretch(SceneTree.STRETCH_MODE_2D, SceneTree.STRETCH_ASPECT_KEEP, size)

viewport.size = scaled_size

prev_size = size

Looks fine here:
Looks fine

Overflows when zoomed in:
Overflows

Did anyone else have this problem? Couldn't find it by searching S: Thanks!

Godot version 3.2.3
in Engine by (12 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.