0 votes

I have this code:

func _ready():
  get_tree().get_root().connect("size_changed", self, "screen_resize")

which works nicely for any resizing of the window except in the case of maximizing either by the maximize button or moving the window to the edges of the screen and sticking it there. I would like to have such a signal or event use the same method as size_changed. Is there such a signal already in Godot or would I have to make my own?

Godot version v3.3.3.stable.official
in Engine by (28 points)

1 Answer

+1 vote

Yeah, size change is on scaling. You probably need a separate branch to handle that based on a check of OS.window_fullscreen - if it's not equal to itself and you'll need to make a member variable to handle the state.

So yes, I think you need to make your own signal.

by (2,087 points)
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 Frequently asked questions and 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 [email protected] with your username.