From 5306f680fd8e314d6f2072f3a9a08f49381ff82d Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Fri, 26 Apr 2024 19:55:42 -0700 Subject: [PATCH] Register ProjectSettings property_info correctly Previously, the code created a property_info dict but didn't actually pass it to anything. ProjectSettings.add_property_info must be called for the type hints and hint strings to be respected. --- addons/input_prompts/plugin.gd | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/input_prompts/plugin.gd b/addons/input_prompts/plugin.gd index 7bb02a7..3c9cafb 100644 --- a/addons/input_prompts/plugin.gd +++ b/addons/input_prompts/plugin.gd @@ -16,12 +16,15 @@ func _enter_tree(): ProjectSettings.set_setting(deadzone_setting, 0.5) ProjectSettings.set_initial_value(deadzone_setting, 0.5) ProjectSettings.set_as_basic(deadzone_setting, true) - var property_info = { - "name": deadzone_setting, - "type": TYPE_FLOAT, - "hint": PROPERTY_HINT_RANGE, - "hint_string": "0,1" - } + ProjectSettings.add_property_info( + { + "name": deadzone_setting, + "type": TYPE_FLOAT, + "hint": PROPERTY_HINT_RANGE, + "hint_string": "0,1" + } + ) + ProjectSettings.save()