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

@ -71,6 +71,7 @@ class EditorSpinSlider : public Range {
bool hide_slider = false;
bool flat = false;
bool editing_integer = false;
void _grab_start();
void _grab_end();
@ -113,6 +114,9 @@ public:
void set_hide_slider(bool p_hide);
bool is_hiding_slider() const;
void set_editing_integer(bool p_editing_integer);
bool is_editing_integer() const;
void set_read_only(bool p_enable);
bool is_read_only() const;