123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- extends Control
- const curseur_main: Texture = preload("res://composants/interface/curseur/hand_point.png")
- func _ready() -> void:
- Input.set_custom_mouse_cursor(curseur_main, Input.CURSOR_POINTING_HAND)
- func reprendre() -> void:
- hide()
- AudioServer.set_bus_effect_enabled(2, 1,false)
- get_tree().set_pause(false)
- Input.set_custom_mouse_cursor(null, Input.CURSOR_ARROW)
- func _unhandled_input(event: InputEvent) -> void:
- if event.is_action_released("ui_pause"):
- if get_tree().is_paused():
- reprendre()
- else:
- AudioServer.set_bus_effect_enabled(2, 1, true)
- get_tree().set_pause(true)
- show()
- func _quand_bouton_reprendre_est_presse():
- reprendre()
- func _quand_bouton_retour_titre_est_presse():
- reprendre()
- get_tree().reload_current_scene()
- func _quand_bouton_quitter_est_presse():
- get_tree().quit()
- func _on_visibility_changed():
- if visible:
- _activer_pause()
- func _activer_pause() -> void:
- %Reprendre.grab_focus()
|