victory_menu.gd 597 B

12345678910111213141516171819202122232425262728
  1. extends VSplitContainer
  2. func _ready() -> void:
  3. set_process_input(false) # Otherwise pause is disabled
  4. func _input(event: InputEvent) -> void:
  5. if event.is_action_released("ui_pause"):
  6. # Prevent title screen to be paused
  7. get_viewport().set_input_as_handled()
  8. func _on_title_button_pressed():
  9. get_tree().reload_current_scene()
  10. func _on_quit_button_pressed():
  11. get_tree().quit()
  12. func _on_visibility_changed():
  13. set_process_input(true)
  14. %TitleButton.grab_focus()
  15. func _on_bottom_limit_area_body_shape_entered(_body_rid, _body, _body_shape_index, _local_shape_index) -> void:
  16. show()