File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ onready var label = $VBoxContainer/Label
99onready var button = $ VBoxContainer/Button
1010onready var button2 = $ VBoxContainer/Button2
1111onready var reset_all_button = $ VBoxContainer/ResetAllButton
12-
12+ # Save the label color so it can be reset.
13+ onready var default_label_color = label .get_color ("font_color" )
1314
1415func _ready ():
1516 # Focus the first button automatically for keyboard/controller-friendly navigation.
@@ -63,7 +64,4 @@ func _on_reset_all_button_pressed():
6364 button2 .add_stylebox_override ("hover" , null )
6465 button2 .add_stylebox_override ("pressed" , null )
6566
66- # If you don't have any references to the previous color value,
67- # you can instance a node at runtime to get this value.
68- var default_label_color = Label .new ().get_color ("font_color" )
6967 label .add_color_override ("font_color" , default_label_color )
You can’t perform that action at this time.
0 commit comments