Ferme les fenêtres (des paramètres) sans mettre pause
This commit is contained in:
@@ -11,6 +11,10 @@ signal closed
|
||||
func _ready():
|
||||
update_title(title)
|
||||
|
||||
func _input(_event: InputEvent) -> void:
|
||||
if is_visible_in_tree() and Input.is_action_just_pressed("pause"):
|
||||
close_window()
|
||||
|
||||
func update_title(text : String):
|
||||
title = text
|
||||
if (is_node_ready()):
|
||||
|
||||
@@ -32,7 +32,12 @@ func set_pause(p):
|
||||
GameInfo.save_settings()
|
||||
|
||||
func _input(_event):
|
||||
if Input.is_action_just_pressed("pause"):
|
||||
if (SceneManager.actual_scene
|
||||
and SceneManager.actual_scene.get_scene_id() != "TITLE"
|
||||
and Input.is_action_just_pressed("pause")
|
||||
and not %Settings.is_visible_in_tree()
|
||||
and not %Controls.is_visible_in_tree()
|
||||
):
|
||||
pause = not pause
|
||||
|
||||
func _on_timeline_ended():
|
||||
|
||||
Reference in New Issue
Block a user