summaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-02 01:12:05 +0200
committertpart <tpart120@proton.me>2024-09-02 01:12:11 +0200
commit20827b958e616e6421e59ebf9d4f24f718ca62fd (patch)
tree2556ffe9deda7ac281c234f7c0dd1ce61dadbd09 /client/global.gd
parent5fec7c7daa4741189a2749d7531e64b1ba6be58b (diff)
downloadhurrycurry-20827b958e616e6421e59ebf9d4f24f718ca62fd.tar
hurrycurry-20827b958e616e6421e59ebf9d4f24f718ca62fd.tar.bz2
hurrycurry-20827b958e616e6421e59ebf9d4f24f718ca62fd.tar.zst
Apply new input settings
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd10
1 files changed, 10 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd
index e9bd1954..0a14ebdc 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -230,6 +230,9 @@ func apply_settings():
using_touch = false
using_touch_change.emit()
+ # Input settings
+ InputManager.apply_input_map(InputManager.settings_dictionary_to_input_map(get_category_settings("input")))
+
settings_changed.emit()
func update_language():
@@ -319,6 +322,13 @@ func get_setting(key: String):
push_error("Tried to access setting \"%s\", which does not exist (missing key)" % key)
return null
+func get_category_settings(category_id: String):
+ for c: SettingsCategory in default_settings:
+ if c.id == category_id:
+ return c.settings
+ push_error("Category %s not found" % category_id)
+ return null
+
func set_setting(key: String, value):
if !settings.has(key):
push_error("Tried to set setting \"%s\", which does not yet exist (missing key)" % key)