Skip to content

Commit

Permalink
Register ProjectSettings property_info correctly
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Pennycook committed Apr 27, 2024
1 parent cc4f414 commit 5306f68
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions addons/input_prompts/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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()


Expand Down

0 comments on commit 5306f68

Please sign in to comment.