2023-11-08 14:28:55 +11:00
|
|
|
extends Control
|
|
|
|
class_name OptionsMenu
|
|
|
|
|
2023-11-19 18:47:52 +11:00
|
|
|
@export var gameplay : GameplayOptionsMenu
|
|
|
|
@export var graphics : GraphicsOptionsMenu
|
|
|
|
@export var keybinds : KeybindsOptionsMenu
|
|
|
|
|
2023-11-08 14:28:55 +11:00
|
|
|
|
|
|
|
func _on_cancel_pressed() -> void:
|
|
|
|
queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_confirm_pressed() -> void:
|
2023-11-19 18:47:52 +11:00
|
|
|
gameplay.save()
|
|
|
|
graphics.save()
|
2023-11-17 20:49:38 +11:00
|
|
|
Data.graphics.apply_graphical_settings(get_viewport())
|
|
|
|
Data.graphics.save_profile_to_disk()
|
2023-11-08 14:28:55 +11:00
|
|
|
Data.preferences.save_profile_to_disk()
|
|
|
|
Data.player_keymap.save_profile_to_disk()
|
|
|
|
queue_free()
|