RhythmGame/scripts/MainMenu.gd

24 lines
571 B
GDScript

extends Control
signal start_touchgame
signal start_stepgame
signal open_settings
func update_libraries_text() -> void:
$lbl_settingspath.text = 'Data directories:\n' + '\n'.join(Settings.get_library_paths())
func _ready() -> void:
update_libraries_text()
Settings.connect('config_loaded', self, 'update_libraries_text')
func quit() -> void:
get_tree().quit()
func _on_btn_touch_pressed() -> void:
emit_signal('start_touchgame')
func _on_btn_step_pressed() -> void:
emit_signal('start_stepgame')
func _on_btn_settings_pressed():
emit_signal('open_settings')