Audio on Creator! (=

This commit is contained in:
Harmony Honey 2024-01-01 13:12:00 -05:00
parent 907df18d11
commit db3ac87e64
3 changed files with 6 additions and 5 deletions

View file

@ -47,10 +47,6 @@ bus = "SFX"
stream = ExtResource( 8 )
bus = "SFX"
[node name="No" type="AudioStreamPlayer" parent="Menu"]
stream = ExtResource( 3 )
bus = "SFX"
[node name="Pause" type="AudioStreamPlayer" parent="Menu"]
stream = ExtResource( 2 )
volume_db = -5.0

View file

@ -62,6 +62,7 @@ func _input(event):
c = 1 if is_action else -1
set_color(cursor_y, colors[cursor_y] + c)
fill_swatches()
Audio.play("menu_scroll3", 0.8, 1.2)
elif cursor_y > 3 and cursor_y < 8:
if btnx != 0:
move_cursor(cursor_x + btnx)
@ -70,12 +71,14 @@ func _input(event):
var s = name_label.text
s.erase(s.length() - 1, 1)
name_label.text = s
Audio.play("menu_exit", 0.8, 1.2)
# write letter
elif is_jump:
var s = rows[cursor_y][cursor_x].get_child(0).text
var l = name_label.text
name_label.text = (l + s).substr(0, 16)
Audio.play("menu_yes", 0.8, 1.2)
elif cursor_y == rows.size() - 1:
if is_jump:
Shared.wipe_scene(Shared.main_menu_path)
@ -84,6 +87,7 @@ func _input(event):
Shared.player_colors = colors
Shared.save_data["username"] = Shared.username
Shared.save_data["player_colors"] = Shared.player_colors
Audio.play("menu_bell", 0.8, 1.2)
func move_cursor(_x := cursor_x, _y = cursor_y):
cursor_y = clamp(_y, 0, rows.size() - 1)
@ -94,6 +98,7 @@ func move_cursor(_x := cursor_x, _y = cursor_y):
arrows.rect_global_position = cursor_node.rect_global_position
arrows.visible = cursor_y < 4
Audio.play("menu_scroll", 0.8, 1.2)
func set_color(_row := cursor_y, _col = colors[cursor_y]):

View file

@ -71,7 +71,7 @@ func switch_menu(arg, silent := false):
menu_stuff = (main_menu if is_main else quit_menu).get_children()
if !silent:
Audio.play("menu_" + ("no" if is_main else "pick"), 0.9, 1.1)
Audio.play("menu_" + ("exit" if is_main else "pick"), 0.9, 1.1)
self.cursor = 0 if is_main else 1