diff options
author | nokoe <nokoe@mailbox.org> | 2024-06-29 21:05:46 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-06-29 21:05:46 +0200 |
commit | d67e6aa03f250715b8e2ec580c93acd443094f72 (patch) | |
tree | 4cc75bd2346fdf9444fe0ed771fe49b82e64790f | |
parent | 81bcf8a4f09fa52573ab6c2caf883c7834afc9d4 (diff) | |
parent | 469ffb30d554fc3ccdb3f0c95b04c617fbafc164 (diff) | |
download | hurrycurry-d67e6aa03f250715b8e2ec580c93acd443094f72.tar hurrycurry-d67e6aa03f250715b8e2ec580c93acd443094f72.tar.bz2 hurrycurry-d67e6aa03f250715b8e2ec580c93acd443094f72.tar.zst |
Merge branch 'master' of ssh://codeberg.org/metamuffin/undercooked
-rw-r--r-- | client/global.gd | 12 | ||||
-rw-r--r-- | client/menu/settings_row.gd | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/client/global.gd b/client/global.gd index da1d8515..b9f35b6b 100644 --- a/client/global.gd +++ b/client/global.gd @@ -21,10 +21,10 @@ extends Node # "type": The type of the setting. Can be "toggle", "line", "range", "dropdown", or "dropdown_preset" # "value": The value of the setting. When using "dropdown", this contains an int # as the index for the respecitve element in the "options" array. -# "apply": Only for type "dropdown_preset": A dictionary to override all other settings. -# "min" and "max": Only for type "range": The min and max values. +# (Optional: Only when type "dropdown_preset") "apply": A dictionary to override all other settings. +# (Optional: Only when type "range") "min" and "max": The min and max values. # "description": The setting name displayed in the settings menu. -# (Optional: Only when type = "dropdown") "options": An array which contains all +# (Optional: Only when type "dropdown") "options": An array which contains all # possible values. const DEFAULT_PROFILE := { @@ -52,9 +52,9 @@ var default_settings := { "graphics_preset": { "type": "dropdown_preset", "options": [tr("Low"), tr("Medium"), tr("High"), tr("Ultra")], - "value":1, + "value": 1, "description": tr("Graphics preset"), - "apply": GRAPHICS_PRESETS + "apply": "GRAPHICS_PRESETS" }, "voxel_gi": { "type": "toggle", @@ -98,7 +98,7 @@ const GRAPHICS_PRESETS = [ { "voxel_gi": true, "sdfgi": false, - "grass_amount": 24 + "grass_amount": 16 } ] diff --git a/client/menu/settings_row.gd b/client/menu/settings_row.gd index bfa7064e..879fb363 100644 --- a/client/menu/settings_row.gd +++ b/client/menu/settings_row.gd @@ -32,7 +32,7 @@ func setup(key: String, dict: Dictionary, defaults: Dictionary): for i in setting["options"]: value_node.add_item(i) value_node.select(value) - value_node.connect("item_selected", apply.bind(setting["apply"])) + value_node.connect("item_selected", apply.bind(Global.get(setting["apply"]))) "range": value_node = HSlider.new() value_node.min_value = setting["min"] |