title_screen.gd 379 B

1234567891011121314151617181920212223
  1. extends VSplitContainer
  2. signal start_game
  3. func _ready() -> void:
  4. %StartButton.grab_focus()
  5. func _input(event: InputEvent) -> void:
  6. if event.is_action_released("ui_pause"):
  7. # Prevent title screen to be paused
  8. get_viewport().set_input_as_handled()
  9. func _on_start_button_pressed():
  10. start_game.emit()
  11. queue_free()
  12. func _on_quit_button_pressed():
  13. get_tree().quit()