aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
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)