extends PanelContainer const GENERAL = "GENERAL" const SHOW_TUTORIAL = "SHOW_TUTORIAL" @onready var show_tutorial = $MarginContainer/VBoxContainer/Tabs/General/GridContainer/TutorialCheckBox @onready var discard_button = $MarginContainer/VBoxContainer/Buttons/Discard @onready var main_menu: PackedScene = load("res://screens/main_menu.tscn") func _ready() -> void: discard_button.text = "BACK" show_tutorial.button_pressed = Config.show_tutorial func _process(_delta: float) -> void: if Input.is_action_just_pressed("ui_cancel"): _on_discard_pressed() func _on_discard_pressed() -> void: get_tree().change_scene_to_packed(main_menu) func _on_save_pressed() -> void: Config.show_tutorial = show_tutorial.button_pressed Config.save() get_tree().change_scene_to_packed(main_menu) func update_discard_button() -> void: var dirty = \ Config.show_tutorial != show_tutorial.button_pressed discard_button.text = "DISCARD" if dirty else "BACK"