fixed sound sound test crash (fixes #192)

This commit is contained in:
pennyrigate 2023-12-26 22:24:05 -05:00
parent 8088322761
commit 90c51d8ce7
2 changed files with 6 additions and 10 deletions

View file

@ -8,11 +8,11 @@ onready var body = $SoundLabel/Label
func _gui_input(event):
if Input.is_action_just_pressed("ui_left"):
current_selection -= 1
if Input.is_action_just_pressed("ui_right"):
elif Input.is_action_just_pressed("ui_right"):
current_selection += 1
if Input.is_action_just_pressed("ui_accept"):
elif Input.is_action_just_pressed("ui_accept"):
Audio.play_sound(sounds[current_selection],Audio.ac_collectible)
if Input.is_action_just_pressed("ui_cancel"):
elif Input.is_action_just_pressed("ui_cancel"):
Audio.ac_music.stop()
current_selection = posmod(current_selection,sounds.size())
body.text = titles[current_selection]