godot-third-person-basic-scene/scenes/music/music_field.gd

19 lines
315 B
GDScript3
Raw Normal View History

2022-04-15 07:53:44 +00:00
extends HBoxContainer
signal selected_music(pos)
var filename:String = ""
var pos:int = 0
func set_music(_filename, musicname, _pos, selected:bool):
filename = _filename
pos = _pos
$Music.set_text(musicname)
$Selected.set_pressed(selected)
func _on_music_pressed():
emit_signal( "selected_music", pos )