Files
2023-03-30 19:13:50 +02:00

15 lines
414 B
GDScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
extends VBoxContainer
func _ready() -> void:
get_viewport().size_changed.connect(_on_viewport_size_changed)
_on_viewport_size_changed()
func _process(_delta: float) -> void:
$FPS.text = "%d FPS (%.2f mspf)" % [Engine.get_frames_per_second(), 1000.0 / Engine.get_frames_per_second()]
func _on_viewport_size_changed() -> void:
$Resolution.text = "%s × %s" % [get_viewport().size.x, get_viewport().size.y]