fix #106: pause menu can be closed via the button
This commit is contained in:
parent
9926e60aeb
commit
b187bf241d
|
|
@ -9,7 +9,7 @@ class_name PauseManu extends PanelContainer
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
resume_button.pressed.connect(_process)
|
||||
resume_button.pressed.connect(owner.toggle_pause_menu)
|
||||
to_menu_button.pressed.connect(_process)
|
||||
to_desktop_button.pressed.connect(func(): get_tree().quit())
|
||||
to_settings_button.pressed.connect(_process)
|
||||
|
|
@ -21,5 +21,6 @@ func _ready() -> void:
|
|||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_help_pressed():
|
||||
OS.shell_open("https://findahelpline.com/")
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ func _process(delta: float) -> void:
|
|||
_return_to_menu()
|
||||
$"Messe-Menue".show()
|
||||
if Input.is_action_just_pressed("ui_menu") and in_game:
|
||||
toggle_pause_menu()
|
||||
|
||||
func toggle_pause_menu():
|
||||
if not get_tree().paused:
|
||||
get_tree().paused = true
|
||||
var state_machine = menu_animation["parameters/playback"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue