#How to move Window Position?

1 messages · Page 1 of 1 (latest)

proud parcel
#

How can I move the game window position?
I searched on google and I found OS.windows_postion += velocity but I get:
"cannot find "window_position" in base "OS"" may because I'm on Godot 4.

astral leaf
proud parcel
# astral leaf Function related to window management have moved to the "DisplayServer" class in...

Thanks but I still don't get how to move the game window, I tryied creating a Window node but is a apart window

extends Node2D

## Window movement
var Window_moving = false
var Window_speed = 0

func _on_player_move_window_up(speed):
    if not Window_moving:
        Window_moving = true
        Window_speed = speed

func _process(delta):
    if Window_moving:
        $Window.position.y += Window_speed * delta
astral leaf
#

DisplayServer.window_set_position(DisplayServer.window_get_position() + Vector2i(0, Window_speed * delta))

proud parcel
#

It worked