mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 23:48:11 +00:00
changing text label colour
This commit is contained in:
@@ -10,8 +10,13 @@ script/source = "extends Node2D
|
||||
|
||||
@export var text := \"\"
|
||||
|
||||
@export_enum(\"Left\", \"Center\", \"Right\") var text_alignment := 0
|
||||
@export var colour := Color.WHITE
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
$TextLabel.text = text
|
||||
$TextLabel.horizontal_alignment = text_alignment
|
||||
$TextLabel.add_theme_color_override(\"font_color\", colour)
|
||||
"
|
||||
|
||||
[node name="TextLabelOBJ" type="Node2D"]
|
||||
@@ -26,7 +31,7 @@ offset_bottom = 8.0
|
||||
|
||||
[node name="EditorPropertyExposer" type="Node" parent="."]
|
||||
script = ExtResource("2_xh6kd")
|
||||
properties = Array[String](["text"])
|
||||
properties = Array[String](["text", "text_alignment", "colour"])
|
||||
metadata/_custom_type_script = "uid://ctfbuoxtnnl0q"
|
||||
|
||||
[node name="LevelEditorVisibleNode" type="Node2D" parent="."]
|
||||
|
||||
Reference in New Issue
Block a user