diff --git a/src/menu/Menu.gd b/src/menu/Menu.gd index 4eb2e8a..7220a0f 100644 --- a/src/menu/Menu.gd +++ b/src/menu/Menu.gd @@ -18,6 +18,7 @@ export var cursor_expand := Vector2.ZERO export var cursor_lerp := 0.2 export var is_audio_scroll = false export var is_sub_visible := false +export var is_audio_back := false export var scroll_path : NodePath = "" onready var scroll_node : Control = get_node_or_null(scroll_path) @@ -73,6 +74,8 @@ func btn_del(): pass func btn_no(): + if is_audio_back: + Audio.play("menu_exit", 0.8, 1.2) if is_close_btn_no: open(false) diff --git a/src/menu/options/KeyMenu.gd b/src/menu/options/KeyMenu.gd index f0237e6..d156433 100644 --- a/src/menu/options/KeyMenu.gd +++ b/src/menu/options/KeyMenu.gd @@ -97,6 +97,7 @@ func menu_input(event): Audio.play("menu_scroll", 0.8, 1.2) elif is_no: open(false) + btn_no() elif is_yes: if is_action: popup.visible = true diff --git a/src/menu/options/KeyMenu.tscn b/src/menu/options/KeyMenu.tscn index c0f4081..47eded2 100644 --- a/src/menu/options/KeyMenu.tscn +++ b/src/menu/options/KeyMenu.tscn @@ -32,6 +32,7 @@ list_path = NodePath("Control/VBox") cursor_path = NodePath("Control/Cursor") cursor_expand = Vector2( 4, 4 ) is_audio_scroll = true +is_audio_back = true scroll_path = NodePath("Control") row_path = NodePath("Control/VBox/Row") label_path = NodePath("Control/VBox/Label") diff --git a/src/menu/options/OptionsMenu.tscn b/src/menu/options/OptionsMenu.tscn index dcc89d5..2d56099 100644 --- a/src/menu/options/OptionsMenu.tscn +++ b/src/menu/options/OptionsMenu.tscn @@ -32,6 +32,7 @@ list_path = NodePath("Center/Control/MenuItems") cursor_path = NodePath("Center/Control/Cursor") cursor_expand = Vector2( 4, 4 ) is_audio_scroll = true +is_audio_back = true is_close_btn_no = true [node name="Back" type="ColorRect" parent="."]