diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-01 18:12:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-01 18:12:54 +0100 |
commit | 0bf3204d89dd57c2409446b91ecfd14f32a5f985 (patch) | |
tree | 20faceed4e769874ca0001625909dcadd3fcaa2c | |
parent | a000186de40735fe72390bf9d6979cde79b4e42d (diff) | |
parent | be687a7e1d656ebd8469cfa0175b655771c80bbe (diff) |
Merge pull request #54379 from Anutrix/editor-default-float-step
-rw-r--r-- | editor/editor_properties_array_dict.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp index 9b5dc8851c..a3b6f6e59b 100644 --- a/editor/editor_properties_array_dict.cpp +++ b/editor/editor_properties_array_dict.cpp @@ -855,6 +855,7 @@ void EditorPropertyDictionary::update_property() { object->set_dict(dict); VBoxContainer *add_vbox = nullptr; + double default_float_step = EDITOR_GET("interface/inspector/default_float_step"); for (int i = 0; i < amount + 2; i++) { String prop_name; @@ -894,7 +895,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::FLOAT: { EditorPropertyFloat *editor = memnew(EditorPropertyFloat); - editor->setup(-100000, 100000, 0.001, true, false, true, true); + editor->setup(-100000, 100000, default_float_step, true, false, true, true); prop = editor; } break; case Variant::STRING: { @@ -905,7 +906,7 @@ void EditorPropertyDictionary::update_property() { // Math types. case Variant::VECTOR2: { EditorPropertyVector2 *editor = memnew(EditorPropertyVector2); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -917,7 +918,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::RECT2: { EditorPropertyRect2 *editor = memnew(EditorPropertyRect2); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -929,7 +930,7 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::VECTOR3: { EditorPropertyVector3 *editor = memnew(EditorPropertyVector3); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; @@ -941,37 +942,37 @@ void EditorPropertyDictionary::update_property() { } break; case Variant::TRANSFORM2D: { EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::PLANE: { EditorPropertyPlane *editor = memnew(EditorPropertyPlane); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::QUATERNION: { EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::AABB: { EditorPropertyAABB *editor = memnew(EditorPropertyAABB); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::BASIS: { EditorPropertyBasis *editor = memnew(EditorPropertyBasis); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; case Variant::TRANSFORM3D: { EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D); - editor->setup(-100000, 100000, 0.001, true); + editor->setup(-100000, 100000, default_float_step, true); prop = editor; } break; |