Browse Source

:lipstick: Make start button have focus on start

DricomDragon 1 year ago
parent
commit
e78e221ed6

+ 3 - 0
godot/component/ui/title/title_screen.gd

@@ -2,6 +2,9 @@ extends VSplitContainer
 
 
 
+func _ready() -> void:
+	%StartButton.grab_focus()
+
 
 func _on_start_button_pressed():
 	print("start")

+ 1 - 0
godot/component/ui/title/title_screen.tscn

@@ -36,6 +36,7 @@ size_flags_horizontal = 4
 size_flags_vertical = 4
 
 [node name="StartButton" type="Button" parent="Buttons"]
+unique_name_in_owner = true
 layout_mode = 2
 theme_override_font_sizes/font_size = 33
 shortcut = SubResource("Shortcut_2uvkc")