Skip to content

Commit 198625e

Browse files
authored
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.
1 parent e12a393 commit 198625e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tutorials/scripting/gdscript/gdscript_exports.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ The limits can be only for the slider if you add the hints "or_greater" and/or "
164164

165165
::
166166

167-
@export_range(0, 100, 1, "or_greater", "or_less")
167+
@export_range(0, 100, 0.1, "or_greater", "or_less") var l
168168

169169
.. TODO: Document other hint strings usable with export_range.
170170

0 commit comments

Comments
 (0)