pause_menu.gd 445 B

123456789101112131415161718192021222324
  1. extends VSplitContainer
  2. func _unhandled_input(event: InputEvent) -> void:
  3. if event.is_action_released("ui_pause") and not get_tree().is_paused():
  4. get_tree().set_pause(true)
  5. show()
  6. func _on_resume_button_pressed():
  7. hide()
  8. get_tree().set_pause(false)
  9. func _on_title_button_pressed():
  10. pass # Replace with function body.
  11. func _on_quit_button_pressed():
  12. get_tree().quit()
  13. func _on_visibility_changed():
  14. %ResumeButton.grab_focus()