gmtk-2024/ui/settings.gd

16 lines
454 B
GDScript3
Raw Normal View History

2024-08-19 02:16:36 +00:00
extends ColorRect
@onready var bar_option = $Bars/Select
2024-08-20 11:40:40 +00:00
@onready var back_button = $BackButton
2024-08-19 02:16:36 +00:00
func _ready() -> void:
bar_option.selected = ConfigManager.get_setting("bars")
bar_option.item_selected.connect(change_bar_selection)
2024-08-20 11:40:40 +00:00
back_button.button_down.connect(main_menu)
2024-08-19 02:16:36 +00:00
func change_bar_selection(index: int) -> void:
ConfigManager.set_setting("bars", index)
2024-08-20 11:40:40 +00:00
func main_menu() -> void:
get_tree().change_scene_to_file("res://ui/MainMenu.tscn")