Make EditorSpinSlider display a slider for floats with a step of 1.0

Integers still don't display a slider (and use up/down arrows instead),
so that they can be quickly distinguished from floats in the inspector.

However, this now makes floats with a step of 1.0 look different
from integers in the inspector.
This commit is contained in:
Hugo Locurcio
2024-08-05 19:20:14 +02:00
parent f1c0b5b854
commit 57700b0563
4 changed files with 26 additions and 1 deletions

View File

@ -10,6 +10,9 @@
<tutorials>
</tutorials>
<members>
<member name="editing_integer" type="bool" setter="set_editing_integer" getter="is_editing_integer" default="false">
If [code]true[/code], the [EditorSpinSlider] is considered to be editing an integer value. If [code]false[/code], the [EditorSpinSlider] is considered to be editing a floating-point value. This is used to determine whether a slider should be drawn. The slider is only drawn for floats; integers use up-down arrows similar to [SpinBox] instead.
</member>
<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
If [code]true[/code], the slider will not draw background.
</member>