From 198625efea6a36e0ea6ee21385140c98e32b1f72 Mon Sep 17 00:00:00 2001 From: Kleidon <157427436+KleidonBD@users.noreply.github.com> Date: Fri, 11 Oct 2024 18:56:18 -0600 Subject: [PATCH] Fix "or_greater"/"or_less" code example The code example demonstrating the usage of the "or_greater" and "or_less" hints for the export_range annotation does not declare a variable after the annotation, which is inconsistent with the previous three code examples in the section. Also, giving the export_range a step of 1 does not create a slider for the property in the editor, like the text suggests, but it instead creates a spin box. The step should be changed to a float so the property can appear as a slider. --- tutorials/scripting/gdscript/gdscript_exports.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/scripting/gdscript/gdscript_exports.rst b/tutorials/scripting/gdscript/gdscript_exports.rst index 4e7430703ab..e2fa6b10596 100644 --- a/tutorials/scripting/gdscript/gdscript_exports.rst +++ b/tutorials/scripting/gdscript/gdscript_exports.rst @@ -164,7 +164,7 @@ The limits can be only for the slider if you add the hints "or_greater" and/or " :: - @export_range(0, 100, 1, "or_greater", "or_less") + @export_range(0, 100, 0.1, "or_greater", "or_less") var l .. TODO: Document other hint strings usable with export_range.