diff --git a/game/scenes/MainScene.gd b/game/scenes/MainScene.gd index 92ef348..696c4f9 100644 --- a/game/scenes/MainScene.gd +++ b/game/scenes/MainScene.gd @@ -54,8 +54,20 @@ func _ready() -> void: initialize_modules() + Settings.connect("setting_changed", self, "setting_changed") + Settings.connect("settings_loaded", self, "settings_loaded") + settings_loaded() + switch_scene(start_scene) + +func setting_changed(section, key, value): + if section == "debug" and key == "style": + curent_style = value + +func settings_loaded(): + curent_style = Settings.get_value("debug", "style") + func initialize_modules() -> void: _modules.clear() diff --git a/game/ui/autoload/SettingsManager.gd b/game/ui/autoload/SettingsManager.gd index d0b8eaf..e87b6da 100644 --- a/game/ui/autoload/SettingsManager.gd +++ b/game/ui/autoload/SettingsManager.gd @@ -43,6 +43,7 @@ var _settings : Dictionary = { "touchscreen_mode" : OS.has_touchscreen_ui_hint(), }, "debug" : { + "style" : 0, "debug_info" : false } } diff --git a/game/ui/options/Options.tscn b/game/ui/options/Options.tscn index 3284d0a..367eb76 100644 --- a/game/ui/options/Options.tscn +++ b/game/ui/options/Options.tscn @@ -151,18 +151,30 @@ margin_right = -4.0 margin_bottom = -4.0 size_flags_horizontal = 3 +[node name="OptionsSpinboxRow" parent="PanelContainer/VBoxContainer/TabContainer/Debug" instance=ExtResource( 8 )] +margin_top = 0.0 +margin_bottom = 24.0 +property_category = "debug" +property_name = "style" +property_label = "Style" +min_value = 0 +max_value = 100 +prefix = "" +suffix = "" + [node name="DebugInfo" type="CheckBox" parent="PanelContainer/VBoxContainer/TabContainer/Debug"] +margin_top = 32.0 margin_right = 527.0 -margin_bottom = 26.269 +margin_bottom = 58.5702 text = "Show Debug info" script = ExtResource( 5 ) property_category = "debug" property_name = "debug_info" [node name="RemoveProfile" type="Button" parent="PanelContainer/VBoxContainer/TabContainer/Debug"] -margin_top = 34.0 +margin_top = 66.0 margin_right = 527.0 -margin_bottom = 60.269 +margin_bottom = 92.5702 size_flags_horizontal = 3 text = "Remove Profile" script = ExtResource( 2 )