2025-02-03 04:55:33 +00:00
|
|
|
extends Control
|
|
|
|
|
|
|
|
@export var start_button: Button
|
|
|
|
@export var quit_button: Button
|
|
|
|
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
start_button.pressed.connect(_on_start_button_pressed)
|
|
|
|
quit_button.pressed.connect(_on_quit_button_pressed)
|
2025-02-03 21:29:06 +00:00
|
|
|
self.visibility_changed.connect(_on_visibility_changed)
|
2025-02-03 04:55:33 +00:00
|
|
|
start_button.grab_focus()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_start_button_pressed():
|
|
|
|
hide()
|
|
|
|
GameManager.start_game()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_quit_button_pressed():
|
|
|
|
get_tree().quit()
|
2025-02-03 21:29:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _on_visibility_changed() -> void:
|
|
|
|
if visible:
|
|
|
|
start_button.grab_focus()
|