HUD Rework and integration

This commit is contained in:
gdz
2025-08-26 18:21:20 +02:00
parent 3b254ea1f7
commit 50cea7f096
6 changed files with 179 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
extends MarginContainer
@onready var NameLabel: Label = $VBoxContainer/NameLabel
func _ready() -> void:
defaultInfoPanel()
ShowInfoPanel()
func BuildInfoPanel(source: Node2D) -> void:
NameLabel.text = source.name
func defaultInfoPanel() -> void:
NameLabel.text = "Nothing to show..."
func worldInfoPanel() -> void:
NameLabel.text = "World"
var sizeLabel: Label = Label.new()
sizeLabel.text = "Viewportsize: {size}".format({"size": get_viewport_rect().size})
$VBoxContainer/HBoxContainer/EntityInformationContainer.add_child(sizeLabel)
func ShowInfoPanel() -> void:
show()
func HideInfoPanel() -> void:
hide()