From 32d7a919e4ace82558178507d93d51017c4dcdc0 Mon Sep 17 00:00:00 2001 From: guzlad Date: Sat, 4 Oct 2025 02:37:06 +0200 Subject: [PATCH] Added text alignment options to level editor labels --- Scenes/Prefabs/LevelObjects/TextLabelObj.tscn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scenes/Prefabs/LevelObjects/TextLabelObj.tscn b/Scenes/Prefabs/LevelObjects/TextLabelObj.tscn index 1ad8d9e..336400f 100644 --- a/Scenes/Prefabs/LevelObjects/TextLabelObj.tscn +++ b/Scenes/Prefabs/LevelObjects/TextLabelObj.tscn @@ -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="."]