Styles are now selectable at runtime.

This commit is contained in:
Relintai 2020-07-13 21:51:58 +02:00
parent fcfed3b282
commit 491a302c3a
3 changed files with 28 additions and 3 deletions

View File

@ -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()

View File

@ -43,6 +43,7 @@ var _settings : Dictionary = {
"touchscreen_mode" : OS.has_touchscreen_ui_hint(),
},
"debug" : {
"style" : 0,
"debug_info" : false
}
}

View File

@ -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 )