Added text alignment options to level editor labels

This commit is contained in:
guzlad
2025-10-04 02:37:06 +02:00
parent 982b5f691e
commit 32d7a919e4

View File

@@ -9,9 +9,12 @@
script/source = "extends Node2D
@export var text := \"\"
@export_enum(\"Left\", \"Center\", \"Right\") var alignment := 0
# guzlad: Do we even need the 4th option \"fill\"?
func _process(_delta: float) -> void:
$TextLabel.text = text
$TextLabel.horizontal_alignment = alignment
"
[node name="TextLabelOBJ" type="Node2D"]
@@ -26,7 +29,7 @@ offset_bottom = 8.0
[node name="EditorPropertyExposer" type="Node" parent="."]
script = ExtResource("2_xh6kd")
properties = Array[String](["text"])
properties = Array[String](["text", "alignment"])
metadata/_custom_type_script = "uid://ctfbuoxtnnl0q"
[node name="LevelEditorVisibleNode" type="Node2D" parent="."]