mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
Menu.is_audio_back to play sound (:
This commit is contained in:
parent
eacecc0bb8
commit
3a219874d3
4 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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="."]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue