#Problem setting minimum window size.

9 messages · Page 1 of 1 (latest)

ebon hill
#

I'm trying to set the minimum size of a window, but I'm not understanding how to do it. I'm doing this:


func _ready():
    var min_size_vector2 = Vector2i(system_settings["min_size_x"], system_settings["min_size_y"])
    Window.set_min_size(min_size_vector2)

However, it states that I cannot call non-static function "set_min_size()" on the class "Window" directly, and to make an instance instead.

How do I do that?

ebon hill
#

<@&486235350839197726> Anyone know what code I would use for this?

raw forge
#

You need to get your window instance as a variable

#

var window := Window.new()

#

Or just get the currently used one

#

For you it's probably get_window() instead

ebon hill
#

I kept trying to do var window = Window.get_window()

burnt fractal
#

might need to get the window via the current viewport, actually