From c869db5eb3fff607b0d9f53e65408e481dc03816 Mon Sep 17 00:00:00 2001 From: grgp Date: Fri, 1 Mar 2024 17:07:52 +0700 Subject: [PATCH 1/5] [Temp] Add GUI scale GUI element --- COGITO/EasyMenus/Scenes/tab_menu.tscn | 30 +++++++++++++++++++ COGITO/EasyMenus/Scripts/options_constants.gd | 1 + 2 files changed, 31 insertions(+) diff --git a/COGITO/EasyMenus/Scenes/tab_menu.tscn b/COGITO/EasyMenus/Scenes/tab_menu.tscn index 01bec37d..13efb75f 100644 --- a/COGITO/EasyMenus/Scenes/tab_menu.tscn +++ b/COGITO/EasyMenus/Scenes/tab_menu.tscn @@ -308,6 +308,35 @@ theme_override_font_sizes/font_size = 20 text = "1" horizontal_alignment = 1 +[node name="HBoxContainer_GUIScale" type="HBoxContainer" parent="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer"] +custom_minimum_size = Vector2(400, 40) +layout_mode = 2 + +[node name="GUIScaleLabel" type="Label" parent="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale"] +custom_minimum_size = Vector2(200, 0) +layout_mode = 2 +size_flags_horizontal = 0 +text = "UI Scale" + +[node name="GUIScaleSlider" type="HSlider" parent="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_horizontal = 3 +size_flags_vertical = 4 +mouse_force_pass_scroll_events = false +min_value = 0.25 +max_value = 2.0 +step = 0.05 +value = 1.0 + +[node name="GUIScaleCurrentValueLabel" type="Label" parent="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale"] +unique_name_in_owner = true +custom_minimum_size = Vector2(50, 0) +layout_mode = 2 +theme_override_font_sizes/font_size = 20 +text = "1" +horizontal_alignment = 1 + [node name="VSyncCheckButton" type="CheckButton" parent="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer"] unique_name_in_owner = true custom_minimum_size = Vector2(200, 0) @@ -433,6 +462,7 @@ start_game_scene = "res://COGITO/DemoScenes/COGITO_01_Demo.tscn" [connection signal="item_selected" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_AA2D/AntiAliasing2DOptionButton" to="TabMenuOptions" method="_on_anti_aliasing_2d_option_button_item_selected"] [connection signal="item_selected" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_AA3D/AntiAliasing3DOptionButton" to="TabMenuOptions" method="_on_anti_aliasing_3d_option_button_item_selected"] [connection signal="value_changed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_RenderScale/RenderScaleSlider" to="TabMenuOptions" method="_on_render_scale_slider_value_changed"] +[connection signal="value_changed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale/GUIScaleSlider" to="TabMenuOptions" method="_on_gui_scale_slider_value_changed"] [connection signal="toggled" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/VSyncCheckButton" to="TabMenuOptions" method="_on_v_sync_check_button_toggled"] [connection signal="pressed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/ApplyChanges" to="TabMenuOptions" method="_on_apply_changes_pressed"] [connection signal="value_changed" from="Content/TabContainer/Audio/ScrollContainer/VBoxContainer/MarginContainer/VBoxContainer/SFXVolumeSlider" to="TabMenuOptions" method="_on_sfx_volume_slider_value_changed"] diff --git a/COGITO/EasyMenus/Scripts/options_constants.gd b/COGITO/EasyMenus/Scripts/options_constants.gd index 3a2bb018..8c36e3f8 100644 --- a/COGITO/EasyMenus/Scripts/options_constants.gd +++ b/COGITO/EasyMenus/Scripts/options_constants.gd @@ -13,6 +13,7 @@ const music_volume_key_name = "music_volume" const windowmode_key_name = "window_mode" const resolution_index_key_name = "resolution_index" const render_scale_key = "render_scale" +const gui_scale_key = "gui_scale" const vsync_key = "vsync" const msaa_2d_key = "msaa_2d" const msaa_3d_key = "msaa_3d" From 8b5e2797fb960f7c4cf6ac8e5c13779e479e0269 Mon Sep 17 00:00:00 2001 From: grgp Date: Fri, 1 Mar 2024 17:10:09 +0700 Subject: [PATCH 2/5] Load GUI scale from options --- COGITO/EasyMenus/Scripts/tab_menu_options.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/COGITO/EasyMenus/Scripts/tab_menu_options.gd b/COGITO/EasyMenus/Scripts/tab_menu_options.gd index 7a686f8e..2ee673cc 100644 --- a/COGITO/EasyMenus/Scripts/tab_menu_options.gd +++ b/COGITO/EasyMenus/Scripts/tab_menu_options.gd @@ -7,6 +7,8 @@ const HSliderWLabel = preload("res://COGITO/EasyMenus/Scripts/slider_w_labels.gd @onready var music_volume_slider: HSliderWLabel = $%MusicVolumeSlider @onready var render_scale_current_value_label: Label = %RenderScaleCurrentValueLabel @onready var render_scale_slider: HSlider = %RenderScaleSlider +@onready var gui_scale_current_value_label: Label = %GUIScaleCurrentValueLabel +@onready var gui_scale_slider: HSlider = $GUIScaleSlider @onready var vsync_check_button: CheckButton = %VSyncCheckButton @onready var invert_y_check_button: CheckButton = %InvertYAxisCheckButton @onready var anti_aliasing_2d_option_button: OptionButton = $%AntiAliasing2DOptionButton @@ -110,6 +112,7 @@ func save_options(): config.set_value(OptionsConstants.section_name, OptionsConstants.windowmode_key_name, window_mode_option_button.selected) config.set_value(OptionsConstants.section_name, OptionsConstants.resolution_index_key_name, resolution_option_button.selected) config.set_value(OptionsConstants.section_name, OptionsConstants.render_scale_key, render_scale_slider.value); + config.set_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, gui_scale_slider.value); config.set_value(OptionsConstants.section_name, OptionsConstants.vsync_key, vsync_check_button.button_pressed) config.set_value(OptionsConstants.section_name, OptionsConstants.invert_vertical_axis_key, invert_y_check_button.button_pressed) config.set_value(OptionsConstants.section_name, OptionsConstants.msaa_2d_key, anti_aliasing_2d_option_button.get_selected_id()) @@ -128,6 +131,7 @@ func load_options(): var window_mode = config.get_value(OptionsConstants.section_name, OptionsConstants.windowmode_key_name, 0) var resolution_index = config.get_value(OptionsConstants.section_name, OptionsConstants.resolution_index_key_name, 0) var render_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.render_scale_key, 1) + var gui_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, 0.75) var vsync = config.get_value(OptionsConstants.section_name, OptionsConstants.vsync_key, true) var invert_y = config.get_value(OptionsConstants.section_name, OptionsConstants.invert_vertical_axis_key, true) var msaa_2d = config.get_value(OptionsConstants.section_name, OptionsConstants.msaa_2d_key, 0) @@ -136,6 +140,7 @@ func load_options(): sfx_volume_slider.hslider.value = sfx_volume music_volume_slider.hslider.value = music_volume render_scale_slider.value = render_scale + gui_scale_slider.value = gui_scale # Need to set it like that to guarantee signal to be triggered vsync_check_button.set_pressed_no_signal(vsync) @@ -160,6 +165,11 @@ func _on_render_scale_slider_value_changed(value): render_scale_current_value_label.text = str(value) +func _on_gui_scale_slider_value_changed(value): + get_viewport().content_scale_factor = value + gui_scale_current_value_label.text = str(value) + + func _on_v_sync_check_button_toggled(button_pressed): # There are multiple V-Sync Methods supported by Godot # For now we just use the simple ones could be worth a consideration to add the others From 0885278e0c69b65a862432988ed5825eab8adce9 Mon Sep 17 00:00:00 2001 From: grgp Date: Fri, 1 Mar 2024 17:40:04 +0700 Subject: [PATCH 3/5] Fix drag --- COGITO/EasyMenus/Scenes/tab_menu.tscn | 3 +- COGITO/EasyMenus/Scripts/tab_menu_options.gd | 30 +++++++++++++++++--- project.godot | 2 ++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/COGITO/EasyMenus/Scenes/tab_menu.tscn b/COGITO/EasyMenus/Scenes/tab_menu.tscn index 13efb75f..386a840e 100644 --- a/COGITO/EasyMenus/Scenes/tab_menu.tscn +++ b/COGITO/EasyMenus/Scenes/tab_menu.tscn @@ -325,7 +325,7 @@ size_flags_horizontal = 3 size_flags_vertical = 4 mouse_force_pass_scroll_events = false min_value = 0.25 -max_value = 2.0 +max_value = 1.5 step = 0.05 value = 1.0 @@ -462,6 +462,7 @@ start_game_scene = "res://COGITO/DemoScenes/COGITO_01_Demo.tscn" [connection signal="item_selected" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_AA2D/AntiAliasing2DOptionButton" to="TabMenuOptions" method="_on_anti_aliasing_2d_option_button_item_selected"] [connection signal="item_selected" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_AA3D/AntiAliasing3DOptionButton" to="TabMenuOptions" method="_on_anti_aliasing_3d_option_button_item_selected"] [connection signal="value_changed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_RenderScale/RenderScaleSlider" to="TabMenuOptions" method="_on_render_scale_slider_value_changed"] +[connection signal="drag_ended" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale/GUIScaleSlider" to="TabMenuOptions" method="_on_gui_scale_slider_drag_ended"] [connection signal="value_changed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/HBoxContainer_GUIScale/GUIScaleSlider" to="TabMenuOptions" method="_on_gui_scale_slider_value_changed"] [connection signal="toggled" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/VSyncCheckButton" to="TabMenuOptions" method="_on_v_sync_check_button_toggled"] [connection signal="pressed" from="Content/TabContainer/Graphics/ScrollContainer/VBoxContainer/ApplyChanges" to="TabMenuOptions" method="_on_apply_changes_pressed"] diff --git a/COGITO/EasyMenus/Scripts/tab_menu_options.gd b/COGITO/EasyMenus/Scripts/tab_menu_options.gd index 2ee673cc..a5126495 100644 --- a/COGITO/EasyMenus/Scripts/tab_menu_options.gd +++ b/COGITO/EasyMenus/Scripts/tab_menu_options.gd @@ -8,7 +8,7 @@ const HSliderWLabel = preload("res://COGITO/EasyMenus/Scripts/slider_w_labels.gd @onready var render_scale_current_value_label: Label = %RenderScaleCurrentValueLabel @onready var render_scale_slider: HSlider = %RenderScaleSlider @onready var gui_scale_current_value_label: Label = %GUIScaleCurrentValueLabel -@onready var gui_scale_slider: HSlider = $GUIScaleSlider +@onready var gui_scale_slider: HSlider = %GUIScaleSlider @onready var vsync_check_button: CheckButton = %VSyncCheckButton @onready var invert_y_check_button: CheckButton = %InvertYAxisCheckButton @onready var anti_aliasing_2d_option_button: OptionButton = $%AntiAliasing2DOptionButton @@ -20,6 +20,9 @@ var sfx_bus_index var music_bus_index var config = ConfigFile.new() +# Need to store this while player drags the slider +var temp_gui_scale_value = null + # Array to set window modes. const WINDOW_MODE_ARRAY : Array[String] = [ "Full screen", @@ -126,12 +129,15 @@ func load_options(): if err != 0: print("Loading options config failed. Using defaults.") + # Set in Project Settings + var default_gui_scale = get_viewport().scaling_3d_scale + var sfx_volume = config.get_value(OptionsConstants.section_name, OptionsConstants.sfx_volume_key_name, 1) var music_volume = config.get_value(OptionsConstants.section_name, OptionsConstants.music_volume_key_name, 1) var window_mode = config.get_value(OptionsConstants.section_name, OptionsConstants.windowmode_key_name, 0) var resolution_index = config.get_value(OptionsConstants.section_name, OptionsConstants.resolution_index_key_name, 0) var render_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.render_scale_key, 1) - var gui_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, 0.75) + var gui_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, default_gui_scale) var vsync = config.get_value(OptionsConstants.section_name, OptionsConstants.vsync_key, true) var invert_y = config.get_value(OptionsConstants.section_name, OptionsConstants.invert_vertical_axis_key, true) var msaa_2d = config.get_value(OptionsConstants.section_name, OptionsConstants.msaa_2d_key, 0) @@ -140,7 +146,9 @@ func load_options(): sfx_volume_slider.hslider.value = sfx_volume music_volume_slider.hslider.value = music_volume render_scale_slider.value = render_scale + gui_scale_slider.value = gui_scale + render_scale_current_value_label.text = str(gui_scale) # Need to set it like that to guarantee signal to be triggered vsync_check_button.set_pressed_no_signal(vsync) @@ -166,8 +174,19 @@ func _on_render_scale_slider_value_changed(value): func _on_gui_scale_slider_value_changed(value): - get_viewport().content_scale_factor = value - gui_scale_current_value_label.text = str(value) + temp_gui_scale_value = value + + +func _on_gui_scale_slider_drag_ended(value_changed): + apply_temp_gui_scale_value() + +# TODO: Apply changes if the slider is clicked but not dragged + +func apply_temp_gui_scale_value(): + if temp_gui_scale_value != null: + get_viewport().content_scale_factor = temp_gui_scale_value + gui_scale_current_value_label.text = str(temp_gui_scale_value) + temp_gui_scale_value = null func _on_v_sync_check_button_toggled(button_pressed): @@ -203,3 +222,6 @@ func set_msaa(mode, index): func _on_apply_changes_pressed() -> void: save_options() options_updated.emit() + + + diff --git a/project.godot b/project.godot index c0da7f79..b93e4bde 100644 --- a/project.godot +++ b/project.godot @@ -31,6 +31,8 @@ CogitoQuestManager="*res://COGITO/QuestSystemPD/CogitoQuestManager.gd" window/size/viewport_width=1280 window/size/viewport_height=720 window/size/initial_position_type=3 +window/stretch/mode="viewport" +window/stretch/aspect="expand" [editor_plugins] From c8ae041debdadae486eb5f38dc326f6fdcbf0168 Mon Sep 17 00:00:00 2001 From: FailSpy <9100196+FailSpy@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:30:43 -0400 Subject: [PATCH 4/5] Add true viewport scaling --- COGITO/EasyMenus/Scripts/tab_menu_options.gd | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/COGITO/EasyMenus/Scripts/tab_menu_options.gd b/COGITO/EasyMenus/Scripts/tab_menu_options.gd index 7a686f8e..6945f9e8 100644 --- a/COGITO/EasyMenus/Scripts/tab_menu_options.gd +++ b/COGITO/EasyMenus/Scripts/tab_menu_options.gd @@ -1,4 +1,5 @@ extends Control +class_name TabMenuOptions signal options_updated const HSliderWLabel = preload("res://COGITO/EasyMenus/Scripts/slider_w_labels.gd") @@ -17,6 +18,8 @@ const HSliderWLabel = preload("res://COGITO/EasyMenus/Scripts/slider_w_labels.gd var sfx_bus_index var music_bus_index var config = ConfigFile.new() +var render_resolution : Vector2i +var render_scale_val : float # Array to set window modes. const WINDOW_MODE_ARRAY : Array[String] = [ @@ -81,11 +84,15 @@ func on_window_mode_selected(index: int) -> void: DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED) DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, false) +func refresh_render(): + get_window().content_scale_size = render_resolution + get_window().scaling_3d_scale = render_scale_val # Function to change resolution. Hooked up to the resolution_option_button. func on_resolution_selected(index:int) -> void: - DisplayServer.window_set_size(RESOUTION_DICTIONARY.values()[index]) - + render_resolution = RESOUTION_DICTIONARY.values()[index] + refresh_render() + get_window().size = render_resolution func _on_sfx_volume_slider_value_changed(value): set_volume(sfx_bus_index, value) @@ -136,6 +143,7 @@ func load_options(): sfx_volume_slider.hslider.value = sfx_volume music_volume_slider.hslider.value = music_volume render_scale_slider.value = render_scale + render_scale_val = render_scale # Need to set it like that to guarantee signal to be triggered vsync_check_button.set_pressed_no_signal(vsync) @@ -156,8 +164,9 @@ func load_options(): func _on_render_scale_slider_value_changed(value): - get_viewport().scaling_3d_scale = value + render_scale_val = value render_scale_current_value_label.text = str(value) + refresh_render() func _on_v_sync_check_button_toggled(button_pressed): From 0e3052466131d9c0a9c9b123fb885d048d5f42e1 Mon Sep 17 00:00:00 2001 From: FailSpy <9100196+FailSpy@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:47:04 -0400 Subject: [PATCH 5/5] Bit of cleanup, and make unapplied changes go away on Tab Menu resume --- COGITO/EasyMenus/Scenes/tab_menu.tscn | 1 + COGITO/EasyMenus/Scripts/tab_menu_options.gd | 37 ++++++++------------ 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/COGITO/EasyMenus/Scenes/tab_menu.tscn b/COGITO/EasyMenus/Scenes/tab_menu.tscn index 41c26f7e..88027a15 100644 --- a/COGITO/EasyMenus/Scenes/tab_menu.tscn +++ b/COGITO/EasyMenus/Scenes/tab_menu.tscn @@ -489,6 +489,7 @@ main_menu_scene = "res://COGITO/DemoScenes/COGITO_MainMenu.tscn" start_game_scene = "res://COGITO/DemoScenes/COGITO_01_Demo.tscn" [connection signal="back_to_main_pressed" from="." to="MenuSceneSwitcher" method="_on_pause_menu_back_to_main_pressed"] +[connection signal="resume" from="." to="TabMenuOptions" method="_on_tab_menu_resume"] [connection signal="pressed" from="Content/TabContainer/Game/VBoxContainer/ResumeGameButton" to="." method="_on_resume_game_button_pressed"] [connection signal="pressed" from="Content/TabContainer/Game/VBoxContainer/SaveButton" to="." method="_on_save_button_pressed"] [connection signal="pressed" from="Content/TabContainer/Game/VBoxContainer/HBoxContainer/LoadButton" to="." method="_on_load_button_pressed"] diff --git a/COGITO/EasyMenus/Scripts/tab_menu_options.gd b/COGITO/EasyMenus/Scripts/tab_menu_options.gd index 9e1ee783..c7c2acb2 100644 --- a/COGITO/EasyMenus/Scripts/tab_menu_options.gd +++ b/COGITO/EasyMenus/Scripts/tab_menu_options.gd @@ -23,9 +23,6 @@ var config = ConfigFile.new() var render_resolution : Vector2i var render_scale_val : float -# Need to store this while player drags the slider -var temp_gui_scale_value = null - # Array to set window modes. const WINDOW_MODE_ARRAY : Array[String] = [ "Full screen", @@ -35,7 +32,7 @@ const WINDOW_MODE_ARRAY : Array[String] = [ ] -const RESOUTION_DICTIONARY : Dictionary = { +const RESOLUTION_DICTIONARY : Dictionary = { "1280x720 (16:9)" : Vector2i(1280,720), "1280x800 (16:10)" : Vector2i(1280,800), "1366x768 (16:9)" : Vector2i(1366,768), @@ -70,7 +67,7 @@ func add_window_mode_items() -> void: # Adding resolutions to the resolution button. func add_resolution_items() -> void: - for resolution_text in RESOUTION_DICTIONARY: + for resolution_text in RESOLUTION_DICTIONARY: resolution_option_button.add_item(resolution_text) @@ -95,7 +92,7 @@ func refresh_render(): # Function to change resolution. Hooked up to the resolution_option_button. func on_resolution_selected(index:int) -> void: - render_resolution = RESOUTION_DICTIONARY.values()[index] + render_resolution = RESOLUTION_DICTIONARY.values()[index] refresh_render() get_window().size = render_resolution @@ -136,15 +133,12 @@ func load_options(): if err != 0: print("Loading options config failed. Using defaults.") - # Set in Project Settings - var default_gui_scale = get_viewport().scaling_3d_scale - var sfx_volume = config.get_value(OptionsConstants.section_name, OptionsConstants.sfx_volume_key_name, 1) var music_volume = config.get_value(OptionsConstants.section_name, OptionsConstants.music_volume_key_name, 1) var window_mode = config.get_value(OptionsConstants.section_name, OptionsConstants.windowmode_key_name, 0) var resolution_index = config.get_value(OptionsConstants.section_name, OptionsConstants.resolution_index_key_name, 0) var render_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.render_scale_key, 1) - var gui_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, default_gui_scale) + var gui_scale = config.get_value(OptionsConstants.section_name, OptionsConstants.gui_scale_key, 1) var vsync = config.get_value(OptionsConstants.section_name, OptionsConstants.vsync_key, true) var invert_y = config.get_value(OptionsConstants.section_name, OptionsConstants.invert_vertical_axis_key, true) var msaa_2d = config.get_value(OptionsConstants.section_name, OptionsConstants.msaa_2d_key, 0) @@ -153,10 +147,11 @@ func load_options(): sfx_volume_slider.hslider.value = sfx_volume music_volume_slider.hslider.value = music_volume render_scale_slider.value = render_scale - render_scale_val = render_scale + gui_scale_slider.value = gui_scale - render_scale_current_value_label.text = str(gui_scale) + gui_scale_current_value_label.text = str(gui_scale) + apply_gui_scale_value() # Need to set it like that to guarantee signal to be triggered vsync_check_button.set_pressed_no_signal(vsync) @@ -183,19 +178,16 @@ func _on_render_scale_slider_value_changed(value): func _on_gui_scale_slider_value_changed(value): - temp_gui_scale_value = value + gui_scale_current_value_label.text = str(value) func _on_gui_scale_slider_drag_ended(value_changed): - apply_temp_gui_scale_value() + apply_gui_scale_value() # TODO: Apply changes if the slider is clicked but not dragged - -func apply_temp_gui_scale_value(): - if temp_gui_scale_value != null: - get_viewport().content_scale_factor = temp_gui_scale_value - gui_scale_current_value_label.text = str(temp_gui_scale_value) - temp_gui_scale_value = null +func apply_gui_scale_value(): + get_viewport().content_scale_factor = gui_scale_slider.value + gui_scale_current_value_label.text = str(gui_scale_slider.value) func _on_v_sync_check_button_toggled(button_pressed): @@ -232,5 +224,6 @@ func _on_apply_changes_pressed() -> void: save_options() options_updated.emit() - - +func _on_tab_menu_resume(): + # reload options + load_options.call_deferred()