diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-23 17:27:55 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-07-23 17:31:38 +0200 |
commit | d844e306147689c3f02473b3dd5d592bdf141023 (patch) | |
tree | 1124a98e2d55dfe351b490b7839bc96de811457e /editor/editor_node.cpp | |
parent | 4c943cca2c6d6cd7a197cb1601a6356e65254837 (diff) |
Inspector: Make default float step configurable
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).
Supersedes #25470.
Partial fix for #18251.
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r-- | editor/editor_node.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index f1944bf63f..5705629c56 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -5557,6 +5557,8 @@ EditorNode::EditorNode() { EDITOR_DEF_RST("interface/scene_tabs/restore_scenes_on_load", false); EDITOR_DEF_RST("interface/scene_tabs/show_thumbnail_on_hover", true); EDITOR_DEF_RST("interface/inspector/capitalize_properties", true); + EDITOR_DEF_RST("interface/inspector/default_float_step", 0.001); + EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::REAL, "interface/inspector/default_float_step", PROPERTY_HINT_EXP_RANGE, "0,1,0")); EDITOR_DEF_RST("interface/inspector/disable_folding", false); EDITOR_DEF_RST("interface/inspector/auto_unfold_foreign_scenes", true); EDITOR_DEF("interface/inspector/horizontal_vector2_editing", false); |