17 lines
444 B
GDScript
17 lines
444 B
GDScript
extends Node2D
|
|
class_name DisplaySettingsNode
|
|
|
|
var window_size: Vector2i
|
|
var window_center: Vector2i
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
func _ready() -> void:
|
|
window_size = DisplayServer.window_get_size()
|
|
window_center = Vector2i(window_size.x/2, window_size.y/2)
|
|
position = window_center
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _process(delta: float) -> void:
|
|
pass
|