Basic UI Logic and game state
This commit is contained in:
@@ -7,6 +7,7 @@ extends Control
|
||||
func _ready():
|
||||
start_button.pressed.connect(_on_start_button_pressed)
|
||||
quit_button.pressed.connect(_on_quit_button_pressed)
|
||||
self.visibility_changed.connect(_on_visibility_changed)
|
||||
start_button.grab_focus()
|
||||
|
||||
|
||||
@@ -17,3 +18,8 @@ func _on_start_button_pressed():
|
||||
|
||||
func _on_quit_button_pressed():
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _on_visibility_changed() -> void:
|
||||
if visible:
|
||||
start_button.grab_focus()
|
||||
|
||||
Reference in New Issue
Block a user