Menu.is_audio_back to play sound (:

This commit is contained in:
Harmony Honey 2024-02-05 22:03:21 -05:00
parent eacecc0bb8
commit 3a219874d3
4 changed files with 6 additions and 0 deletions

View file

@ -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)

View file

@ -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

View file

@ -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")

View file

@ -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="."]