aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-07 11:38:13 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-07 11:38:13 +0200
commit66eb933df271eaca4df6201c55bb678275abf9df (patch)
treeeabb509b1612f8ddf6b5f53b73b3e3fd5692a7f1 /client
parent7f559afc6307d628ca56de175486323d587d71a8 (diff)
downloadhurrycurry-66eb933df271eaca4df6201c55bb678275abf9df.tar
hurrycurry-66eb933df271eaca4df6201c55bb678275abf9df.tar.bz2
hurrycurry-66eb933df271eaca4df6201c55bb678275abf9df.tar.zst
fix remaining settings
Diffstat (limited to 'client')
-rw-r--r--client/global.gd4
-rw-r--r--client/menu/blur_setup.gd4
-rw-r--r--client/settings.gd5
3 files changed, 6 insertions, 7 deletions
diff --git a/client/global.gd b/client/global.gd
index 6d41dc31..47d9da06 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -83,7 +83,7 @@ func _input(event):
using_joypad_change.emit(using_joypad)
# Update using_touch variable
- if get_setting("ui.touch_controls") == 0: # Only if set to automatic
+ if get_setting("ui.touch_controls") == "automatic": # Only if set to automatic
if event is InputEventScreenTouch or event is InputEventScreenDrag:
if not using_touch:
using_touch = true
@@ -143,7 +143,7 @@ func get_setting(key: String):
func set_setting_unchecked(key: String, value):
value = value.duplicate(true) if value is Array else value
- if key in settings and settings[key] == value: return
+ if key in settings and typeof(settings[key]) == typeof(value) and settings[key] == value: return
settings[key] = value
if Settings.change_hooks_display.get(key) != null: Settings.change_hooks_display.get(key).call(value)
if Settings.change_hooks_apply.get(key) != null: Settings.change_hooks_apply.get(key).call(value)
diff --git a/client/menu/blur_setup.gd b/client/menu/blur_setup.gd
index b5b5dde9..b5f80540 100644
--- a/client/menu/blur_setup.gd
+++ b/client/menu/blur_setup.gd
@@ -16,8 +16,8 @@
extends Control
func _ready():
- update(Global.get_setting("ui.blur"))
- Settings.hook_changed("ui.blur", update)
+ update(Global.get_setting("graphics.ui_blur"))
+ Settings.hook_changed("graphics.ui_blur", update)
func update(state):
material.set_shader_parameter("enable_blur", state)
diff --git a/client/settings.gd b/client/settings.gd
index ade51262..bfa25a00 100644
--- a/client/settings.gd
+++ b/client/settings.gd
@@ -52,7 +52,7 @@ static func get_root():
RangeSetting.new("sfx_volume", 0, -30, 0),
]),
SettingsCategory.new("ui", [
- DropdownSetting.new("touch_controls", 0, ["automatic", "enabled", "disabled"]),
+ DropdownSetting.new("touch_controls", "automatic", ["automatic", "enabled", "disabled"]),
DropdownSetting.new("language", "system", Global.language_list()),
DropdownSetting.new("scale_mode", "resize", ["resize", "disabled"]),
RangeSetting.new("scale_factor", 1. if not Global.on_mobile() else 1.5, 0.5, 1.5, 3),
@@ -110,7 +110,7 @@ static func h_taa(enabled):
static func h_scale_mode(mode: String):
match mode:
- "scale": Global.get_tree().root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
+ "resize": Global.get_tree().root.content_scale_mode = Window.CONTENT_SCALE_MODE_CANVAS_ITEMS
"disabled": Global.get_tree().root.content_scale_mode = Window.CONTENT_SCALE_MODE_DISABLED
static func h_scale_factor(value: float):
@@ -127,7 +127,6 @@ static func h_touch(mode: String):
Global.using_touch_change.emit()
static func h_language(language: String):
- print("STELANG ", language)
if language == "system": language = OS.get_locale_language()
TranslationServer.set_locale(language)