aboutsummaryrefslogtreecommitdiff
path: root/client/menu/settings.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/settings.gd')
-rw-r--r--client/menu/settings.gd44
1 files changed, 27 insertions, 17 deletions
diff --git a/client/menu/settings.gd b/client/menu/settings.gd
index 27e08db7..93155a93 100644
--- a/client/menu/settings.gd
+++ b/client/menu/settings.gd
@@ -16,7 +16,7 @@
#
extends Menu
-@onready var options: VBoxContainer = $OuterGap/Panel/InnerGap/VBoxContainer/ScrollContainer/Options
+@onready var settings_tabs: TabContainer = $OuterGap/Panel/InnerGap/VBoxContainer/TabContainer
func _ready():
super()
@@ -31,25 +31,35 @@ func exit():
super()
func update_rows(fix_focus = false):
- for c in options.get_children():
+ for c in settings_tabs.get_children():
c.queue_free()
- for i in Global.presets:
- var label := Label.new()
- label.text = i.label
- var hbox := HBoxContainer.new()
- var spacer := Control.new()
- spacer.size_flags_horizontal = Control.SIZE_EXPAND
- hbox.add_child(label)
- hbox.add_child(spacer)
- options.add_child(hbox)
- for b in i.buttons():
- hbox.add_child(b)
-
- for k in Global.settings.keys():
- var row: SettingsRow = Global.settings[k].get_row()
- options.add_child(row)
+# TODO: Re-implement presets in new system
+# for i in Global.presets:
+# var label := Label.new()
+# label.text = i.label
+# var hbox := HBoxContainer.new()
+# var spacer := Control.new()
+# spacer.size_flags_horizontal = Control.SIZE_EXPAND
+# hbox.add_child(label)
+# hbox.add_child(spacer)
+# options.add_child(hbox)
+# for b in i.buttons():
+# hbox.add_child(b)
+ for category: SettingsCategory in Global.default_settings:
+ var category_settings = category.settings
+ var scroll := ScrollContainerCustom.new()
+ var options := VBoxContainer.new()
+ scroll.name = category.name
+ scroll.size_flags_horizontal = Control.SIZE_EXPAND_FILL
+ settings_tabs.add_child(scroll)
+ options.size_flags_horizontal = Control.SIZE_EXPAND_FILL
+ scroll.add_child(options)
+ for k: String in category_settings.keys():
+ var row: SettingsRow = Global.settings[k].get_row()
+ options.add_child(row)
+
if fix_focus:
pass
# TODO: Not implemented!