mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 06:11:29 +03:00
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:
@@ -1343,6 +1343,7 @@ void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step,
|
||||
EditorPropertyInteger::EditorPropertyInteger() {
|
||||
spin = memnew(EditorSpinSlider);
|
||||
spin->set_flat(true);
|
||||
spin->set_editing_integer(true);
|
||||
add_child(spin);
|
||||
add_focusable(spin);
|
||||
spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyInteger::_value_changed));
|
||||
|
||||
Reference in New Issue
Block a user