Browse Source

Allow to use sliders for integers in `EditorSpinSlider`

Michael Alexsander 4 weeks ago
parent
commit
f16ff829f0

+ 1 - 1
core/config/project_settings.cpp

@@ -1698,7 +1698,7 @@ ProjectSettings::ProjectSettings() {
 	// installed by the scripts provided in the repository
 	// installed by the scripts provided in the repository
 	// (check `misc/scripts/install_d3d12_sdk_windows.py`).
 	// (check `misc/scripts/install_d3d12_sdk_windows.py`).
 	// For example, if the script installs 1.613.3, the default value must be 613.
 	// For example, if the script installs 1.613.3, the default value must be 613.
-	GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_slider"), 613);
+	GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/rendering_device/d3d12/agility_sdk_version", PROPERTY_HINT_RANGE, "0,10000,1,or_greater,hide_control"), 613);
 
 
 	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
 	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
 	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
 	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);

+ 1 - 1
core/object/object.h

@@ -51,7 +51,7 @@ class Ref;
 
 
 enum PropertyHint {
 enum PropertyHint {
 	PROPERTY_HINT_NONE, ///< no hint provided.
 	PROPERTY_HINT_NONE, ///< no hint provided.
-	PROPERTY_HINT_RANGE, ///< hint_text = "min,max[,step][,or_greater][,or_less][,hide_slider][,radians_as_degrees][,degrees][,exp][,suffix:<keyword>] range.
+	PROPERTY_HINT_RANGE, ///< hint_text = "min,max[,step][,or_greater][,or_less][,prefer_slider][,hide_control][,radians_as_degrees][,degrees][,exp][,suffix:<keyword>] range.
 	PROPERTY_HINT_ENUM, ///< hint_text= "val1,val2,val3,etc"
 	PROPERTY_HINT_ENUM, ///< hint_text= "val1,val2,val3,etc"
 	PROPERTY_HINT_ENUM_SUGGESTION, ///< hint_text= "val1,val2,val3,etc"
 	PROPERTY_HINT_ENUM_SUGGESTION, ///< hint_text= "val1,val2,val3,etc"
 	PROPERTY_HINT_EXP_EASING, /// exponential easing function (Math::ease) use "attenuation" hint string to revert (flip h), "positive_only" to exclude in-out and out-in. (ie: "attenuation,positive_only")
 	PROPERTY_HINT_EXP_EASING, /// exponential easing function (Math::ease) use "attenuation" hint string to revert (flip h), "positive_only" to exclude in-out and out-in. (ie: "attenuation,positive_only")

+ 1 - 1
doc/classes/@GlobalScope.xml

@@ -2771,7 +2771,7 @@
 		<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
 		<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
 			Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
 			Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
 			[b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
 			[b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
-			Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider.
+			Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle, [code]"prefer_slider"[/code] to show the slider for integers, and [code]"hide_control"[/code] to hide the slider or up-down arrows.
 		</constant>
 		</constant>
 		<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
 		<constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint">
 			Hints that an [int] or [String] property is an enumerated value to pick in a list specified via a hint string.
 			Hints that an [int] or [String] property is an enumerated value to pick in a list specified via a hint string.

+ 3 - 0
doc/classes/EditorSettings.xml

@@ -1027,6 +1027,9 @@
 		<member name="interface/inspector/horizontal_vector_types_editing" type="bool" setter="" getter="">
 		<member name="interface/inspector/horizontal_vector_types_editing" type="bool" setter="" getter="">
 			If [code]true[/code], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Plane], and [Quaternion] properties are shown on a single line in the inspector instead of multiple lines. This is overall more compact, but it can be harder to view and edit large values without expanding the inspector horizontally.
 			If [code]true[/code], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Plane], and [Quaternion] properties are shown on a single line in the inspector instead of multiple lines. This is overall more compact, but it can be harder to view and edit large values without expanding the inspector horizontally.
 		</member>
 		</member>
+		<member name="interface/inspector/integer_drag_speed" type="float" setter="" getter="">
+			Base speed for increasing/decreasing integer values by dragging them in the inspector.
+		</member>
 		<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
 		<member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter="">
 			The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor.
 			The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor.
 		</member>
 		</member>

+ 16 - 2
doc/classes/EditorSpinSlider.xml

@@ -10,14 +10,17 @@
 	<tutorials>
 	<tutorials>
 	</tutorials>
 	</tutorials>
 	<members>
 	<members>
+		<member name="control_state" type="int" setter="set_control_state" getter="get_control_state" enum="EditorSpinSlider.ControlState" default="0">
+			The state in which the control used to manipulate the value will be.
+		</member>
 		<member name="editing_integer" type="bool" setter="set_editing_integer" getter="is_editing_integer" default="false">
 		<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.
+			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 by default. The slider is only drawn for floats; integers use up-down arrows similar to [SpinBox] instead, unless [member control_state] is set to [constant CONTROL_STATE_PREFER_SLIDER]. It will also use [member EditorSettings.interface/inspector/integer_drag_speed] instead of [member EditorSettings.interface/inspector/float_drag_speed] if the slider is available.
 		</member>
 		</member>
 		<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
 		<member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false">
 			If [code]true[/code], the slider will not draw background.
 			If [code]true[/code], the slider will not draw background.
 		</member>
 		</member>
 		<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
 		<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
-		<member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false">
+		<member name="hide_slider" type="bool" setter="set_hide_slider" getter="is_hiding_slider" default="false" deprecated="Use [member control_state] instead.">
 			If [code]true[/code], the slider and up/down arrows are hidden.
 			If [code]true[/code], the slider and up/down arrows are hidden.
 		</member>
 		</member>
 		<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
 		<member name="label" type="String" setter="set_label" getter="get_label" default="&quot;&quot;">
@@ -59,6 +62,17 @@
 			</description>
 			</description>
 		</signal>
 		</signal>
 	</signals>
 	</signals>
+	<constants>
+		<constant name="CONTROL_STATE_DEFAULT" value="0" enum="ControlState">
+			The type of control used will depend on the value of [member editing_integer]. Up-down arrows if [code]true[/code], a slider if [code]false[/code].
+		</constant>
+		<constant name="CONTROL_STATE_PREFER_SLIDER" value="1" enum="ControlState">
+			A slider will always be used, even if [member editing_integer] is enabled.
+		</constant>
+		<constant name="CONTROL_STATE_HIDE" value="2" enum="ControlState">
+			Neither the up-down arrows nor the slider will be shown.
+		</constant>
+	</constants>
 	<theme_items>
 	<theme_items>
 		<theme_item name="updown" data_type="icon" type="Texture2D">
 		<theme_item name="updown" data_type="icon" type="Texture2D">
 			Single texture representing both the up and down buttons.
 			Single texture representing both the up and down buttons.

+ 2 - 2
editor/animation/animation_track_editor.cpp

@@ -2051,7 +2051,7 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
 	length->set_step(SECOND_DECIMAL);
 	length->set_step(SECOND_DECIMAL);
 	length->set_allow_greater(true);
 	length->set_allow_greater(true);
 	length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
 	length->set_custom_minimum_size(Vector2(70 * EDSCALE, 0));
-	length->set_hide_slider(true);
+	length->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
 	length->set_tooltip_text(TTR("Animation length (seconds)"));
 	length->set_tooltip_text(TTR("Animation length (seconds)"));
 	length->set_accessibility_name(TTRC("Animation length (seconds)"));
 	length->set_accessibility_name(TTRC("Animation length (seconds)"));
 	length->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
 	length->connect(SceneStringName(value_changed), callable_mp(this, &AnimationTimelineEdit::_anim_length_changed));
@@ -7970,7 +7970,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
 	step->set_min(0);
 	step->set_min(0);
 	step->set_max(1000000);
 	step->set_max(1000000);
 	step->set_step(SECOND_DECIMAL);
 	step->set_step(SECOND_DECIMAL);
-	step->set_hide_slider(true);
+	step->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
 	step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
 	step->set_custom_minimum_size(Size2(100, 0) * EDSCALE);
 	step->set_tooltip_text(TTR("Animation step value."));
 	step->set_tooltip_text(TTR("Animation step value."));
 	step->set_accessibility_name(TTRC("Animation step value."));
 	step->set_accessibility_name(TTRC("Animation step value."));

+ 49 - 23
editor/gui/editor_spin_slider.cpp

@@ -38,15 +38,20 @@
 #include "scene/theme/theme_db.h"
 #include "scene/theme/theme_db.h"
 
 
 String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
 String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
+	String value = get_text_value() + suffix;
 	if (!read_only && grabber->is_visible()) {
 	if (!read_only && grabber->is_visible()) {
+		String tooltip = value;
 		Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
 		Key key = (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) ? Key::META : Key::CTRL;
-		return TS->format_number(rtos(get_value())) + suffix + "\n\n" + vformat(TTR("Hold %s to round to integers.\nHold Shift for more precise changes."), find_keycode_name(key));
+		if (!editing_integer) {
+			tooltip += "\n\n" + vformat(TTR("Hold %s to round to integers."), find_keycode_name(key));
+		}
+		return tooltip + "\n" + TTR("Hold Shift for more precise changes.");
 	}
 	}
-	return TS->format_number(rtos(get_value())) + suffix;
+	return value;
 }
 }
 
 
 String EditorSpinSlider::get_text_value() const {
 String EditorSpinSlider::get_text_value() const {
-	return TS->format_number(String::num(get_value(), Math::range_step_decimals(get_step())));
+	return TS->format_number(editing_integer ? itos(get_value()) : rtos(get_value()));
 }
 }
 
 
 void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
 void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
@@ -109,17 +114,8 @@ void EditorSpinSlider::gui_input(const Ref<InputEvent> &p_event) {
 					pre_grab_value = get_max();
 					pre_grab_value = get_max();
 				}
 				}
 
 
-				if (mm->is_command_or_control_pressed()) {
-					// If control was just pressed, don't make the value do a huge jump in magnitude.
-					if (grabbing_spinner_dist_cache != 0) {
-						pre_grab_value += grabbing_spinner_dist_cache * get_step();
-						grabbing_spinner_dist_cache = 0;
-					}
-
-					set_value(Math::round(pre_grab_value + get_step() * grabbing_spinner_dist_cache * 10));
-				} else {
-					set_value(pre_grab_value + get_step() * grabbing_spinner_dist_cache);
-				}
+				double new_value = pre_grab_value + get_step() * grabbing_spinner_dist_cache;
+				set_value((mm->is_command_or_control_pressed() && !editing_integer) ? Math::round(new_value) : new_value);
 			}
 			}
 		} else if (updown_offset != -1) {
 		} else if (updown_offset != -1) {
 			bool new_hover = (!is_layout_rtl() && mm->get_position().x > updown_offset) || (is_layout_rtl() && mm->get_position().x < updown_offset);
 			bool new_hover = (!is_layout_rtl() && mm->get_position().x > updown_offset) || (is_layout_rtl() && mm->get_position().x < updown_offset);
@@ -158,6 +154,7 @@ void EditorSpinSlider::_grab_end() {
 		if (grabbing_spinner) {
 		if (grabbing_spinner) {
 			Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
 			Input::get_singleton()->set_mouse_mode(Input::MOUSE_MODE_VISIBLE);
 			Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos);
 			Input::get_singleton()->warp_mouse(grabbing_spinner_mouse_pos);
+			mouse_over_grabber = true;
 			queue_redraw();
 			queue_redraw();
 			grabbing_spinner = false;
 			grabbing_spinner = false;
 			emit_signal("ungrabbed");
 			emit_signal("ungrabbed");
@@ -207,7 +204,12 @@ void EditorSpinSlider::_grabber_gui_input(const Ref<InputEvent> &p_event) {
 			grab_focus();
 			grab_focus();
 			emit_signal("grabbed");
 			emit_signal("grabbed");
 		} else {
 		} else {
-			grabbing_grabber = false;
+			if (grabbing_grabber) {
+				grabbing_grabber = false;
+				if (!mouse_over_grabber) {
+					queue_redraw();
+				}
+			}
 			mousewheel_over_grabber = false;
 			mousewheel_over_grabber = false;
 			emit_signal("ungrabbed");
 			emit_signal("ungrabbed");
 		}
 		}
@@ -377,8 +379,8 @@ void EditorSpinSlider::_draw_spin_slider() {
 	}
 	}
 	TS->free_rid(num_rid);
 	TS->free_rid(num_rid);
 
 
-	if (!hide_slider) {
-		if (editing_integer) {
+	if (control_state != CONTROL_STATE_HIDE) {
+		if (editing_integer && control_state == CONTROL_STATE_DEFAULT) {
 			Ref<Texture2D> updown2 = read_only ? theme_cache.updown_disabled_icon : theme_cache.updown_icon;
 			Ref<Texture2D> updown2 = read_only ? theme_cache.updown_disabled_icon : theme_cache.updown_icon;
 			int updown_vofs = (size.height - updown2->get_height()) / 2;
 			int updown_vofs = (size.height - updown2->get_height()) / 2;
 			if (rtl) {
 			if (rtl) {
@@ -427,7 +429,7 @@ void EditorSpinSlider::_draw_spin_slider() {
 
 
 			if (display_grabber) {
 			if (display_grabber) {
 				Ref<Texture2D> grabber_tex;
 				Ref<Texture2D> grabber_tex;
-				if (mouse_over_grabber) {
+				if (mouse_over_grabber || grabbing_grabber) {
 					grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
 					grabber_tex = get_theme_icon(SNAME("grabber_highlight"), SNAME("HSlider"));
 				} else {
 				} else {
 					grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
 					grabber_tex = get_theme_icon(SNAME("grabber"), SNAME("HSlider"));
@@ -453,7 +455,7 @@ void EditorSpinSlider::_draw_spin_slider() {
 void EditorSpinSlider::_notification(int p_what) {
 void EditorSpinSlider::_notification(int p_what) {
 	switch (p_what) {
 	switch (p_what) {
 		case NOTIFICATION_ENTER_TREE: {
 		case NOTIFICATION_ENTER_TREE: {
-			grabbing_spinner_speed = EDITOR_GET("interface/inspector/float_drag_speed");
+			grabbing_spinner_speed = editing_integer ? EDITOR_GET("interface/inspector/integer_drag_speed") : EDITOR_GET("interface/inspector/float_drag_speed");
 			_update_value_input_stylebox();
 			_update_value_input_stylebox();
 		} break;
 		} break;
 
 
@@ -523,14 +525,24 @@ Size2 EditorSpinSlider::get_minimum_size() const {
 	return ms;
 	return ms;
 }
 }
 
 
-void EditorSpinSlider::set_hide_slider(bool p_hide) {
-	hide_slider = p_hide;
+void EditorSpinSlider::set_control_state(ControlState p_state) {
+	control_state = p_state;
 	queue_redraw();
 	queue_redraw();
 }
 }
 
 
+EditorSpinSlider::ControlState EditorSpinSlider::get_control_state() const {
+	return control_state;
+}
+
+#ifndef DISABLE_DEPRECATED
+void EditorSpinSlider::set_hide_slider(bool p_hide) {
+	set_control_state(p_hide ? CONTROL_STATE_HIDE : CONTROL_STATE_DEFAULT);
+}
+
 bool EditorSpinSlider::is_hiding_slider() const {
 bool EditorSpinSlider::is_hiding_slider() const {
-	return hide_slider;
+	return control_state == CONTROL_STATE_HIDE;
 }
 }
+#endif
 
 
 void EditorSpinSlider::set_editing_integer(bool p_editing_integer) {
 void EditorSpinSlider::set_editing_integer(bool p_editing_integer) {
 	if (p_editing_integer == editing_integer) {
 	if (p_editing_integer == editing_integer) {
@@ -538,7 +550,10 @@ void EditorSpinSlider::set_editing_integer(bool p_editing_integer) {
 	}
 	}
 
 
 	editing_integer = p_editing_integer;
 	editing_integer = p_editing_integer;
-	queue_redraw();
+	if (is_inside_tree()) {
+		grabbing_spinner_speed = editing_integer ? EDITOR_GET("interface/inspector/integer_drag_speed") : EDITOR_GET("interface/inspector/float_drag_speed");
+		queue_redraw();
+	}
 }
 }
 
 
 bool EditorSpinSlider::is_editing_integer() const {
 bool EditorSpinSlider::is_editing_integer() const {
@@ -701,8 +716,12 @@ void EditorSpinSlider::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat);
 	ClassDB::bind_method(D_METHOD("set_flat", "flat"), &EditorSpinSlider::set_flat);
 	ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
 	ClassDB::bind_method(D_METHOD("is_flat"), &EditorSpinSlider::is_flat);
 
 
+	ClassDB::bind_method(D_METHOD("set_control_state", "state"), &EditorSpinSlider::set_control_state);
+	ClassDB::bind_method(D_METHOD("get_control_state"), &EditorSpinSlider::get_control_state);
+#ifndef DISABLE_DEPRECATED
 	ClassDB::bind_method(D_METHOD("set_hide_slider", "hide_slider"), &EditorSpinSlider::set_hide_slider);
 	ClassDB::bind_method(D_METHOD("set_hide_slider", "hide_slider"), &EditorSpinSlider::set_hide_slider);
 	ClassDB::bind_method(D_METHOD("is_hiding_slider"), &EditorSpinSlider::is_hiding_slider);
 	ClassDB::bind_method(D_METHOD("is_hiding_slider"), &EditorSpinSlider::is_hiding_slider);
+#endif
 
 
 	ClassDB::bind_method(D_METHOD("set_editing_integer", "editing_integer"), &EditorSpinSlider::set_editing_integer);
 	ClassDB::bind_method(D_METHOD("set_editing_integer", "editing_integer"), &EditorSpinSlider::set_editing_integer);
 	ClassDB::bind_method(D_METHOD("is_editing_integer"), &EditorSpinSlider::is_editing_integer);
 	ClassDB::bind_method(D_METHOD("is_editing_integer"), &EditorSpinSlider::is_editing_integer);
@@ -711,9 +730,16 @@ void EditorSpinSlider::_bind_methods() {
 	ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix");
 	ADD_PROPERTY(PropertyInfo(Variant::STRING, "suffix"), "set_suffix", "get_suffix");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "read_only"), "set_read_only", "is_read_only");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat");
+	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "control_state"), "set_control_state", "get_control_state");
+#ifndef DISABLE_DEPRECATED
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_slider"), "set_hide_slider", "is_hiding_slider");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "hide_slider"), "set_hide_slider", "is_hiding_slider");
+#endif
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editing_integer"), "set_editing_integer", "is_editing_integer");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editing_integer"), "set_editing_integer", "is_editing_integer");
 
 
+	BIND_ENUM_CONSTANT(CONTROL_STATE_DEFAULT);
+	BIND_ENUM_CONSTANT(CONTROL_STATE_PREFER_SLIDER);
+	BIND_ENUM_CONSTANT(CONTROL_STATE_HIDE);
+
 	ADD_SIGNAL(MethodInfo("grabbed"));
 	ADD_SIGNAL(MethodInfo("grabbed"));
 	ADD_SIGNAL(MethodInfo("ungrabbed"));
 	ADD_SIGNAL(MethodInfo("ungrabbed"));
 	ADD_SIGNAL(MethodInfo("updown_pressed"));
 	ADD_SIGNAL(MethodInfo("updown_pressed"));

+ 16 - 1
editor/gui/editor_spin_slider.h

@@ -68,7 +68,15 @@ class EditorSpinSlider : public Range {
 	uint64_t value_input_closed_frame = 0;
 	uint64_t value_input_closed_frame = 0;
 	bool value_input_dirty = false;
 	bool value_input_dirty = false;
 
 
-	bool hide_slider = false;
+public:
+	enum ControlState {
+		CONTROL_STATE_DEFAULT,
+		CONTROL_STATE_PREFER_SLIDER,
+		CONTROL_STATE_HIDE,
+	};
+
+private:
+	ControlState control_state = CONTROL_STATE_DEFAULT;
 	bool flat = false;
 	bool flat = false;
 	bool editing_integer = false;
 	bool editing_integer = false;
 
 
@@ -110,8 +118,13 @@ public:
 	void set_suffix(const String &p_suffix);
 	void set_suffix(const String &p_suffix);
 	String get_suffix() const;
 	String get_suffix() const;
 
 
+	void set_control_state(ControlState p_type);
+	ControlState get_control_state() const;
+
+#ifndef DISABLE_DEPRECATED
 	void set_hide_slider(bool p_hide);
 	void set_hide_slider(bool p_hide);
 	bool is_hiding_slider() const;
 	bool is_hiding_slider() const;
+#endif
 
 
 	void set_editing_integer(bool p_editing_integer);
 	void set_editing_integer(bool p_editing_integer);
 	bool is_editing_integer() const;
 	bool is_editing_integer() const;
@@ -130,3 +143,5 @@ public:
 	virtual Size2 get_minimum_size() const override;
 	virtual Size2 get_minimum_size() const override;
 	EditorSpinSlider();
 	EditorSpinSlider();
 };
 };
+
+VARIANT_ENUM_CAST(EditorSpinSlider::ControlState)

+ 67 - 39
editor/inspector/editor_properties.cpp

@@ -1466,11 +1466,15 @@ void EditorPropertyInteger::update_property() {
 #endif
 #endif
 }
 }
 
 
-void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_hide_slider, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {
+void EditorPropertyInteger::setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_prefer_slider, bool p_hide_control, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix) {
 	spin->set_min(p_min);
 	spin->set_min(p_min);
 	spin->set_max(p_max);
 	spin->set_max(p_max);
 	spin->set_step(p_step);
 	spin->set_step(p_step);
-	spin->set_hide_slider(p_hide_slider);
+	if (p_hide_control) {
+		spin->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+	} else {
+		spin->set_control_state(p_prefer_slider ? EditorSpinSlider::CONTROL_STATE_PREFER_SLIDER : EditorSpinSlider::CONTROL_STATE_DEFAULT);
+	}
 	spin->set_allow_greater(p_allow_greater);
 	spin->set_allow_greater(p_allow_greater);
 	spin->set_allow_lesser(p_allow_lesser);
 	spin->set_allow_lesser(p_allow_lesser);
 	spin->set_suffix(p_suffix);
 	spin->set_suffix(p_suffix);
@@ -1593,12 +1597,14 @@ void EditorPropertyFloat::update_property() {
 	spin->set_value_no_signal(val);
 	spin->set_value_no_signal(val);
 }
 }
 
 
-void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_radians_as_degrees) {
+void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_hide_control, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_radians_as_degrees) {
 	radians_as_degrees = p_radians_as_degrees;
 	radians_as_degrees = p_radians_as_degrees;
 	spin->set_min(p_min);
 	spin->set_min(p_min);
 	spin->set_max(p_max);
 	spin->set_max(p_max);
 	spin->set_step(p_step);
 	spin->set_step(p_step);
-	spin->set_hide_slider(p_hide_slider);
+	if (p_hide_control) {
+		spin->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+	}
 	spin->set_exp_ratio(p_exp_range);
 	spin->set_exp_ratio(p_exp_range);
 	spin->set_allow_greater(p_greater);
 	spin->set_allow_greater(p_greater);
 	spin->set_allow_lesser(p_lesser);
 	spin->set_allow_lesser(p_lesser);
@@ -1815,7 +1821,7 @@ EditorPropertyEasing::EditorPropertyEasing() {
 	spin->set_min(-100);
 	spin->set_min(-100);
 	spin->set_max(100);
 	spin->set_max(100);
 	spin->set_step(0);
 	spin->set_step(0);
-	spin->set_hide_slider(true);
+	spin->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
 	spin->set_allow_lesser(true);
 	spin->set_allow_lesser(true);
 	spin->set_allow_greater(true);
 	spin->set_allow_greater(true);
 	spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
 	spin->connect(SceneStringName(value_changed), callable_mp(this, &EditorPropertyEasing::_spin_value_changed));
@@ -1860,12 +1866,14 @@ void EditorPropertyRect2::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 4; i++) {
 	for (int i = 0; i < 4; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_suffix(p_suffix);
 		spin[i]->set_suffix(p_suffix);
@@ -2048,12 +2056,14 @@ void EditorPropertyPlane::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 4; i++) {
 	for (int i = 0; i < 4; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 	}
 	}
@@ -2197,12 +2207,14 @@ void EditorPropertyQuaternion::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix, bool p_hide_editor) {
+void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix, bool p_hide_editor) {
 	for (int i = 0; i < 4; i++) {
 	for (int i = 0; i < 4; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		// Quaternion is inherently unitless, however someone may want to use it as
 		// Quaternion is inherently unitless, however someone may want to use it as
@@ -2214,7 +2226,6 @@ void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step,
 		euler[i]->set_min(-360);
 		euler[i]->set_min(-360);
 		euler[i]->set_max(360);
 		euler[i]->set_max(360);
 		euler[i]->set_step(0.1);
 		euler[i]->set_step(0.1);
-		euler[i]->set_hide_slider(false);
 		euler[i]->set_allow_greater(true);
 		euler[i]->set_allow_greater(true);
 		euler[i]->set_allow_lesser(true);
 		euler[i]->set_allow_lesser(true);
 		euler[i]->set_suffix(U"\u00B0");
 		euler[i]->set_suffix(U"\u00B0");
@@ -2343,12 +2354,14 @@ void EditorPropertyAABB::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 6; i++) {
 	for (int i = 0; i < 6; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_suffix(p_suffix);
 		spin[i]->set_suffix(p_suffix);
@@ -2421,12 +2434,14 @@ void EditorPropertyTransform2D::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 6; i++) {
 	for (int i = 0; i < 6; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		if (i % 3 == 2) {
 		if (i % 3 == 2) {
@@ -2503,12 +2518,14 @@ void EditorPropertyBasis::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 9; i++) {
 	for (int i = 0; i < 9; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		// Basis is inherently unitless, however someone may want to use it as
 		// Basis is inherently unitless, however someone may want to use it as
@@ -2592,12 +2609,14 @@ void EditorPropertyTransform3D::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 12; i++) {
 	for (int i = 0; i < 12; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		if (i % 4 == 3) {
 		if (i % 4 == 3) {
@@ -2689,12 +2708,14 @@ void EditorPropertyProjection::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
+void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix) {
 	for (int i = 0; i < 16; i++) {
 	for (int i = 0; i < 16; i++) {
 		spin[i]->set_min(p_min);
 		spin[i]->set_min(p_min);
 		spin[i]->set_max(p_max);
 		spin[i]->set_max(p_max);
 		spin[i]->set_step(p_step);
 		spin[i]->set_step(p_step);
-		spin[i]->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin[i]->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_greater(true);
 		spin[i]->set_allow_lesser(true);
 		spin[i]->set_allow_lesser(true);
 		if (i % 4 == 3) {
 		if (i % 4 == 3) {
@@ -3603,7 +3624,8 @@ struct EditorPropertyRangeHint {
 	double step = 1.0;
 	double step = 1.0;
 	String suffix;
 	String suffix;
 	bool exp_range = false;
 	bool exp_range = false;
-	bool hide_slider = true;
+	bool prefer_slider = false;
+	bool hide_control = true;
 	bool radians_as_degrees = false;
 	bool radians_as_degrees = false;
 };
 };
 
 
@@ -3611,7 +3633,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
 	EditorPropertyRangeHint hint;
 	EditorPropertyRangeHint hint;
 	hint.step = p_default_step;
 	hint.step = p_default_step;
 	if (is_int) {
 	if (is_int) {
-		hint.hide_slider = false; // Always show slider for ints, unless specified in hint range.
+		hint.hide_control = false; // Always show controls for ints, unless specified in hint range.
 	}
 	}
 	Vector<String> slices = p_hint_text.split(",");
 	Vector<String> slices = p_hint_text.split(",");
 	if (p_hint == PROPERTY_HINT_RANGE) {
 	if (p_hint == PROPERTY_HINT_RANGE) {
@@ -3628,15 +3650,21 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
 			// Step is optional, could be something else if not a number.
 			// Step is optional, could be something else if not a number.
 			hint.step = slices[2].to_float();
 			hint.step = slices[2].to_float();
 		}
 		}
-		hint.hide_slider = false;
+		hint.hide_control = false;
 		for (int i = 2; i < slices.size(); i++) {
 		for (int i = 2; i < slices.size(); i++) {
 			String slice = slices[i].strip_edges();
 			String slice = slices[i].strip_edges();
 			if (slice == "or_greater") {
 			if (slice == "or_greater") {
 				hint.or_greater = true;
 				hint.or_greater = true;
 			} else if (slice == "or_less") {
 			} else if (slice == "or_less") {
 				hint.or_less = true;
 				hint.or_less = true;
+			} else if (slice == "prefer_slider") {
+				hint.prefer_slider = true;
+			} else if (slice == "hide_control") {
+				hint.hide_control = true;
+#ifndef DISABLE_DEPRECATED
 			} else if (slice == "hide_slider") {
 			} else if (slice == "hide_slider") {
-				hint.hide_slider = true;
+				hint.hide_control = true;
+#endif
 			} else if (slice == "exp") {
 			} else if (slice == "exp") {
 				hint.exp_range = true;
 				hint.exp_range = true;
 			}
 			}
@@ -3774,7 +3802,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 				EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
 				EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
 
 
 				EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
 				EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
-				editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.or_greater, hint.or_less, hint.suffix);
+				editor->setup(hint.min, hint.max, hint.step, hint.prefer_slider, hint.hide_control, hint.or_greater, hint.or_less, hint.suffix);
 
 
 				return editor;
 				return editor;
 			}
 			}
@@ -3802,7 +3830,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 				EditorPropertyFloat *editor = memnew(EditorPropertyFloat);
 				EditorPropertyFloat *editor = memnew(EditorPropertyFloat);
 
 
 				EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 				EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-				editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.exp_range, hint.or_greater, hint.or_less, hint.suffix, hint.radians_as_degrees);
+				editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.exp_range, hint.or_greater, hint.or_less, hint.suffix, hint.radians_as_degrees);
 
 
 				return editor;
 				return editor;
 			}
 			}
@@ -3859,7 +3887,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 			EditorPropertyVector2 *editor = memnew(EditorPropertyVector2(p_wide));
 			EditorPropertyVector2 *editor = memnew(EditorPropertyVector2(p_wide));
 
 
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
 			return editor;
 			return editor;
 
 
 		} break;
 		} break;
@@ -3873,7 +3901,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 		case Variant::RECT2: {
 		case Variant::RECT2: {
 			EditorPropertyRect2 *editor = memnew(EditorPropertyRect2(p_wide));
 			EditorPropertyRect2 *editor = memnew(EditorPropertyRect2(p_wide));
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::RECT2I: {
 		case Variant::RECT2I: {
@@ -3886,7 +3914,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 		case Variant::VECTOR3: {
 		case Variant::VECTOR3: {
 			EditorPropertyVector3 *editor = memnew(EditorPropertyVector3(p_wide));
 			EditorPropertyVector3 *editor = memnew(EditorPropertyVector3(p_wide));
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
 			return editor;
 			return editor;
 
 
 		} break;
 		} break;
@@ -3900,7 +3928,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 		case Variant::VECTOR4: {
 		case Variant::VECTOR4: {
 			EditorPropertyVector4 *editor = memnew(EditorPropertyVector4);
 			EditorPropertyVector4 *editor = memnew(EditorPropertyVector4);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, p_hint == PROPERTY_HINT_LINK, hint.suffix, hint.radians_as_degrees);
 			return editor;
 			return editor;
 
 
 		} break;
 		} break;
@@ -3914,44 +3942,44 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
 		case Variant::TRANSFORM2D: {
 		case Variant::TRANSFORM2D: {
 			EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D);
 			EditorPropertyTransform2D *editor = memnew(EditorPropertyTransform2D);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::PLANE: {
 		case Variant::PLANE: {
 			EditorPropertyPlane *editor = memnew(EditorPropertyPlane(p_wide));
 			EditorPropertyPlane *editor = memnew(EditorPropertyPlane(p_wide));
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::QUATERNION: {
 		case Variant::QUATERNION: {
 			EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion);
 			EditorPropertyQuaternion *editor = memnew(EditorPropertyQuaternion);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix, p_hint == PROPERTY_HINT_HIDE_QUATERNION_EDIT);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix, p_hint == PROPERTY_HINT_HIDE_QUATERNION_EDIT);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::AABB: {
 		case Variant::AABB: {
 			EditorPropertyAABB *editor = memnew(EditorPropertyAABB);
 			EditorPropertyAABB *editor = memnew(EditorPropertyAABB);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::BASIS: {
 		case Variant::BASIS: {
 			EditorPropertyBasis *editor = memnew(EditorPropertyBasis);
 			EditorPropertyBasis *editor = memnew(EditorPropertyBasis);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 		} break;
 		} break;
 		case Variant::TRANSFORM3D: {
 		case Variant::TRANSFORM3D: {
 			EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D);
 			EditorPropertyTransform3D *editor = memnew(EditorPropertyTransform3D);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 
 
 		} break;
 		} break;
 		case Variant::PROJECTION: {
 		case Variant::PROJECTION: {
 			EditorPropertyProjection *editor = memnew(EditorPropertyProjection);
 			EditorPropertyProjection *editor = memnew(EditorPropertyProjection);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
 			EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, default_float_step);
-			editor->setup(hint.min, hint.max, hint.step, hint.hide_slider, hint.suffix);
+			editor->setup(hint.min, hint.max, hint.step, hint.hide_control, hint.suffix);
 			return editor;
 			return editor;
 
 
 		} break;
 		} break;

+ 10 - 10
editor/inspector/editor_properties.h

@@ -370,7 +370,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_hide_slider, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
+	void setup(int64_t p_min, int64_t p_max, int64_t p_step, bool p_prefer_slider, bool p_hide_control, bool p_allow_greater, bool p_allow_lesser, const String &p_suffix = String());
 	EditorPropertyInteger();
 	EditorPropertyInteger();
 };
 };
 
 
@@ -421,7 +421,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_radians_as_degrees = false);
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_radians_as_degrees = false);
 	EditorPropertyFloat();
 	EditorPropertyFloat();
 };
 };
 
 
@@ -477,7 +477,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyRect2(bool p_force_wide = false);
 	EditorPropertyRect2(bool p_force_wide = false);
 };
 };
 
 
@@ -507,7 +507,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyPlane(bool p_force_wide = false);
 	EditorPropertyPlane(bool p_force_wide = false);
 };
 };
 
 
@@ -539,7 +539,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String(), bool p_hide_editor = false);
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String(), bool p_hide_editor = false);
 	EditorPropertyQuaternion();
 	EditorPropertyQuaternion();
 };
 };
 
 
@@ -554,7 +554,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyAABB();
 	EditorPropertyAABB();
 };
 };
 
 
@@ -569,7 +569,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyTransform2D(bool p_include_origin = true);
 	EditorPropertyTransform2D(bool p_include_origin = true);
 };
 };
 
 
@@ -584,7 +584,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyBasis();
 	EditorPropertyBasis();
 };
 };
 
 
@@ -600,7 +600,7 @@ protected:
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
 	virtual void update_using_transform(Transform3D p_transform);
 	virtual void update_using_transform(Transform3D p_transform);
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyTransform3D();
 	EditorPropertyTransform3D();
 };
 };
 
 
@@ -616,7 +616,7 @@ protected:
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
 	virtual void update_using_transform(Projection p_transform);
 	virtual void update_using_transform(Projection p_transform);
-	void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
+	void setup(double p_min, double p_max, double p_step, bool p_hide_control, const String &p_suffix = String());
 	EditorPropertyProjection();
 	EditorPropertyProjection();
 };
 };
 
 

+ 4 - 2
editor/inspector/editor_properties_vector.cpp

@@ -153,14 +153,16 @@ void EditorPropertyVectorN::_notification(int p_what) {
 	}
 	}
 }
 }
 
 
-void EditorPropertyVectorN::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix, bool p_radians_as_degrees, bool p_is_int) {
+void EditorPropertyVectorN::setup(double p_min, double p_max, double p_step, bool p_hide_control, bool p_link, const String &p_suffix, bool p_radians_as_degrees, bool p_is_int) {
 	radians_as_degrees = p_radians_as_degrees;
 	radians_as_degrees = p_radians_as_degrees;
 
 
 	for (EditorSpinSlider *spin : spin_sliders) {
 	for (EditorSpinSlider *spin : spin_sliders) {
 		spin->set_min(p_min);
 		spin->set_min(p_min);
 		spin->set_max(p_max);
 		spin->set_max(p_max);
 		spin->set_step(p_step);
 		spin->set_step(p_step);
-		spin->set_hide_slider(p_hide_slider);
+		if (p_hide_control) {
+			spin->set_control_state(EditorSpinSlider::CONTROL_STATE_HIDE);
+		}
 		spin->set_allow_greater(true);
 		spin->set_allow_greater(true);
 		spin->set_allow_lesser(true);
 		spin->set_allow_lesser(true);
 		spin->set_suffix(p_suffix);
 		spin->set_suffix(p_suffix);

+ 1 - 1
editor/inspector/editor_properties_vector.h

@@ -61,7 +61,7 @@ protected:
 
 
 public:
 public:
 	virtual void update_property() override;
 	virtual void update_property() override;
-	void setup(double p_min, double p_max, double p_step = 1.0, bool p_hide_slider = true, bool p_link = false, const String &p_suffix = String(), bool p_radians_as_degrees = false, bool p_is_int = false);
+	void setup(double p_min, double p_max, double p_step = 1.0, bool p_hide_control = true, bool p_link = false, const String &p_suffix = String(), bool p_radians_as_degrees = false, bool p_is_int = false);
 	EditorPropertyVectorN(Variant::Type p_type, bool p_force_wide, bool p_horizontal);
 	EditorPropertyVectorN(Variant::Type p_type, bool p_force_wide, bool p_horizontal);
 };
 };
 
 

+ 4 - 4
editor/scene/2d/tiles/tile_proxies_manager_dialog.cpp

@@ -401,7 +401,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
 	source_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	source_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	source_from_property_editor->set_selectable(false);
 	source_from_property_editor->set_selectable(false);
 	source_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	source_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-	source_from_property_editor->setup(-1, 99999, 1, false, true, false);
+	source_from_property_editor->setup(-1, 99999, 1, false, false, true, false);
 	vboxcontainer_from->add_child(source_from_property_editor);
 	vboxcontainer_from->add_child(source_from_property_editor);
 
 
 	coords_from_property_editor = memnew(EditorPropertyVector2i);
 	coords_from_property_editor = memnew(EditorPropertyVector2i);
@@ -420,7 +420,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
 	alternative_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	alternative_from_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	alternative_from_property_editor->set_selectable(false);
 	alternative_from_property_editor->set_selectable(false);
 	alternative_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	alternative_from_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-	alternative_from_property_editor->setup(-1, 99999, 1, false, true, false);
+	alternative_from_property_editor->setup(-1, 99999, 1, false, false, true, false);
 	alternative_from_property_editor->hide();
 	alternative_from_property_editor->hide();
 	vboxcontainer_from->add_child(alternative_from_property_editor);
 	vboxcontainer_from->add_child(alternative_from_property_editor);
 
 
@@ -435,7 +435,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
 	source_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	source_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	source_to_property_editor->set_selectable(false);
 	source_to_property_editor->set_selectable(false);
 	source_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	source_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-	source_to_property_editor->setup(-1, 99999, 1, false, true, false);
+	source_to_property_editor->setup(-1, 99999, 1, false, false, true, false);
 	vboxcontainer_to->add_child(source_to_property_editor);
 	vboxcontainer_to->add_child(source_to_property_editor);
 
 
 	coords_to_property_editor = memnew(EditorPropertyVector2i);
 	coords_to_property_editor = memnew(EditorPropertyVector2i);
@@ -454,7 +454,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
 	alternative_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	alternative_to_property_editor->connect("property_changed", callable_mp(this, &TileProxiesManagerDialog::_property_changed));
 	alternative_to_property_editor->set_selectable(false);
 	alternative_to_property_editor->set_selectable(false);
 	alternative_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	alternative_to_property_editor->set_h_size_flags(Control::SIZE_EXPAND_FILL);
-	alternative_to_property_editor->setup(-1, 99999, 1, false, true, false);
+	alternative_to_property_editor->setup(-1, 99999, 1, false, false, true, false);
 	alternative_to_property_editor->hide();
 	alternative_to_property_editor->hide();
 	vboxcontainer_to->add_child(alternative_to_property_editor);
 	vboxcontainer_to->add_child(alternative_to_property_editor);
 
 

+ 2 - 2
editor/scene/gui/font_config_plugin.cpp

@@ -465,7 +465,7 @@ void EditorPropertyOTVariation::update_property() {
 			Vector3i range = supported.get_value_at_index(i);
 			Vector3i range = supported.get_value_at_index(i);
 
 
 			EditorPropertyInteger *prop = memnew(EditorPropertyInteger);
 			EditorPropertyInteger *prop = memnew(EditorPropertyInteger);
-			prop->setup(range.x, range.y, false, true, false, false);
+			prop->setup(range.x, range.y, 1, false, true, false, false);
 			prop->set_object_and_property(object.ptr(), "keys/" + itos(name_tag));
 			prop->set_object_and_property(object.ptr(), "keys/" + itos(name_tag));
 
 
 			String name = TS->tag_to_name(name_tag);
 			String name = TS->tag_to_name(name_tag);
@@ -746,7 +746,7 @@ void EditorPropertyOTFeatures::update_property() {
 					} break;
 					} break;
 					case Variant::INT: {
 					case Variant::INT: {
 						EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
 						EditorPropertyInteger *editor = memnew(EditorPropertyInteger);
-						editor->setup(0, 255, 1, false, false, false);
+						editor->setup(0, 255, 1, false, false, false, false);
 						prop = editor;
 						prop = editor;
 					} break;
 					} break;
 					default: {
 					default: {

+ 1 - 0
editor/settings/editor_settings.cpp

@@ -550,6 +550,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
 	EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1")
 	EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_RANGE, "interface/inspector/max_array_dictionary_items_per_page", 20, "10,100,1")
 	EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/show_low_level_opentype_features", false, "")
 	EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/show_low_level_opentype_features", false, "")
 	EDITOR_SETTING_BASIC(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/inspector/float_drag_speed", 5.0, "0.1,100,0.01")
 	EDITOR_SETTING_BASIC(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/inspector/float_drag_speed", 5.0, "0.1,100,0.01")
+	EDITOR_SETTING_BASIC(Variant::FLOAT, PROPERTY_HINT_RANGE, "interface/inspector/integer_drag_speed", 0.5, "0.1,10,0.01")
 	EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/nested_color_mode", 0, "Containers & Resources,Resources,External Resources")
 	EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/nested_color_mode", 0, "Containers & Resources,Resources,External Resources")
 	EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/delimitate_all_container_and_resources", true, "")
 	EDITOR_SETTING(Variant::BOOL, PROPERTY_HINT_NONE, "interface/inspector/delimitate_all_container_and_resources", true, "")
 	EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/default_property_name_style", EditorPropertyNameProcessor::STYLE_CAPITALIZED, "Raw (e.g. \"z_index\"),Capitalized (e.g. \"Z Index\"),Localized (e.g. \"Z Index\")", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
 	EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/inspector/default_property_name_style", EditorPropertyNameProcessor::STYLE_CAPITALIZED, "Raw (e.g. \"z_index\"),Capitalized (e.g. \"Z Index\"),Localized (e.g. \"Z Index\")", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);

+ 1 - 1
modules/gdscript/doc_classes/@GDScript.xml

@@ -665,7 +665,7 @@
 			<param index="3" name="extra_hints" type="String" default="&quot;&quot;" />
 			<param index="3" name="extra_hints" type="String" default="&quot;&quot;" />
 			<description>
 			<description>
 				Export an [int], [float], [Array][lb][int][rb], [Array][lb][float][rb], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], or [PackedFloat64Array] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [member EditorSettings.interface/inspector/default_float_step] setting.
 				Export an [int], [float], [Array][lb][int][rb], [Array][lb][float][rb], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], or [PackedFloat64Array] property as a range value. The range must be defined by [param min] and [param max], as well as an optional [param step] and a variety of extra hints. The [param step] defaults to [code]1[/code] for integer properties. For floating-point numbers this value depends on your [member EditorSettings.interface/inspector/default_float_step] setting.
-				If hints [code]"or_greater"[/code] and [code]"or_less"[/code] are provided, the editor widget will not cap the value at range boundaries. The [code]"exp"[/code] hint will make the edited values on range to change exponentially. The [code]"hide_slider"[/code] hint will hide the slider element of the editor widget.
+				If hints [code]"or_greater"[/code] and [code]"or_less"[/code] are provided, the editor widget will not cap the value at range boundaries. The [code]"exp"[/code] hint will make the edited values on range to change exponentially. The [code]"prefer_slider"[/code] hint will make integer values use the slider instead of arrows for editing, while [code]"hide_control"[/code] will hide the element controlling the value of the editor widget.
 				Hints also allow to indicate the units for the edited value. Using [code]"radians_as_degrees"[/code] you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). [code]"degrees"[/code] allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using [code]"suffix:unit"[/code], where "unit" can be any string.
 				Hints also allow to indicate the units for the edited value. Using [code]"radians_as_degrees"[/code] you can specify that the actual value is in radians, but should be displayed in degrees in the Inspector dock (the range values are also in degrees). [code]"degrees"[/code] allows to add a degree sign as a unit suffix (the value is unchanged). Finally, a custom suffix can be provided using [code]"suffix:unit"[/code], where "unit" can be any string.
 				See also [constant PROPERTY_HINT_RANGE].
 				See also [constant PROPERTY_HINT_RANGE].
 				[codeblock]
 				[codeblock]

+ 4 - 1
modules/gdscript/gdscript_editor.cpp

@@ -925,9 +925,12 @@ static void _find_annotation_arguments(const GDScriptParser::AnnotationNode *p_a
 			ScriptLanguage::CodeCompletionOption slider2("or_less", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT);
 			ScriptLanguage::CodeCompletionOption slider2("or_less", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT);
 			slider2.insert_text = slider2.display.quote(p_quote_style);
 			slider2.insert_text = slider2.display.quote(p_quote_style);
 			r_result.insert(slider2.display, slider2);
 			r_result.insert(slider2.display, slider2);
-			ScriptLanguage::CodeCompletionOption slider3("hide_slider", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT);
+			ScriptLanguage::CodeCompletionOption slider3("prefer_slider", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT);
 			slider3.insert_text = slider3.display.quote(p_quote_style);
 			slider3.insert_text = slider3.display.quote(p_quote_style);
 			r_result.insert(slider3.display, slider3);
 			r_result.insert(slider3.display, slider3);
+			ScriptLanguage::CodeCompletionOption slider4("hide_control", ScriptLanguage::CODE_COMPLETION_KIND_PLAIN_TEXT);
+			slider4.insert_text = slider4.display.quote(p_quote_style);
+			r_result.insert(slider4.display, slider4);
 		}
 		}
 	} else if (p_annotation->name == SNAME("@export_exp_easing")) {
 	} else if (p_annotation->name == SNAME("@export_exp_easing")) {
 		if (p_argument == 0 || p_argument == 1) {
 		if (p_argument == 0 || p_argument == 1) {

+ 1 - 1
scene/2d/node_2d.cpp

@@ -496,7 +496,7 @@ void Node2D::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("get_relative_transform_to_parent", "parent"), &Node2D::get_relative_transform_to_parent);
 	ClassDB::bind_method(D_METHOD("get_relative_transform_to_parent", "parent"), &Node2D::get_relative_transform_to_parent);
 
 
 	ADD_GROUP("Transform", "");
 	ADD_GROUP("Transform", "");
-	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position", PROPERTY_HINT_RANGE, "-99999,99999,or_less,or_greater,hide_slider,suffix:px"), "set_position", "get_position");
+	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position", PROPERTY_HINT_RANGE, "-99999,99999,or_less,or_greater,hide_control,suffix:px"), "set_position", "get_position");
 	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians_as_degrees"), "set_rotation", "get_rotation");
 	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians_as_degrees"), "set_rotation", "get_rotation");
 	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_rotation_degrees", "get_rotation_degrees");
 	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_rotation_degrees", "get_rotation_degrees");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale", PROPERTY_HINT_LINK), "set_scale", "get_scale");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "scale", PROPERTY_HINT_LINK), "set_scale", "get_scale");

+ 1 - 1
scene/3d/node_3d.cpp

@@ -1523,7 +1523,7 @@ void Node3D::_bind_methods() {
 	ADD_GROUP("Transform", "");
 	ADD_GROUP("Transform", "");
 	ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NO_EDITOR), "set_transform", "get_transform");
 	ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NO_EDITOR), "set_transform", "get_transform");
 	ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "global_transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform");
 	ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM3D, "global_transform", PROPERTY_HINT_NONE, "suffix:m", PROPERTY_USAGE_NONE), "set_global_transform", "get_global_transform");
-	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position", PROPERTY_HINT_RANGE, "-99999,99999,or_greater,or_less,hide_slider,suffix:m", PROPERTY_USAGE_EDITOR), "set_position", "get_position");
+	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position", PROPERTY_HINT_RANGE, "-99999,99999,or_greater,or_less,hide_control,suffix:m", PROPERTY_USAGE_EDITOR), "set_position", "get_position");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians_as_degrees", PROPERTY_USAGE_EDITOR), "set_rotation", "get_rotation");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation", PROPERTY_HINT_RANGE, "-360,360,0.1,or_less,or_greater,radians_as_degrees", PROPERTY_USAGE_EDITOR), "set_rotation", "get_rotation");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_rotation_degrees", "get_rotation_degrees");
 	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "rotation_degrees", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NONE), "set_rotation_degrees", "get_rotation_degrees");
 	ADD_PROPERTY(PropertyInfo(Variant::QUATERNION, "quaternion", PROPERTY_HINT_HIDE_QUATERNION_EDIT, "", PROPERTY_USAGE_EDITOR), "set_quaternion", "get_quaternion");
 	ADD_PROPERTY(PropertyInfo(Variant::QUATERNION, "quaternion", PROPERTY_HINT_HIDE_QUATERNION_EDIT, "", PROPERTY_USAGE_EDITOR), "set_quaternion", "get_quaternion");

+ 1 - 1
scene/3d/spring_bone_simulator_3d.cpp

@@ -1312,7 +1312,7 @@ void SpringBoneSimulator3D::_bind_methods() {
 	// To process manually.
 	// To process manually.
 	ClassDB::bind_method(D_METHOD("reset"), &SpringBoneSimulator3D::reset);
 	ClassDB::bind_method(D_METHOD("reset"), &SpringBoneSimulator3D::reset);
 
 
-	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "external_force", PROPERTY_HINT_RANGE, "-99999,99999,or_greater,or_less,hide_slider,suffix:m/s"), "set_external_force", "get_external_force");
+	ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "external_force", PROPERTY_HINT_RANGE, "-99999,99999,or_greater,or_less,hide_control,suffix:m/s"), "set_external_force", "get_external_force");
 	ADD_ARRAY_COUNT("Settings", "setting_count", "set_setting_count", "get_setting_count", "settings/");
 	ADD_ARRAY_COUNT("Settings", "setting_count", "set_setting_count", "get_setting_count", "settings/");
 
 
 	BIND_ENUM_CONSTANT(BONE_DIRECTION_PLUS_X);
 	BIND_ENUM_CONSTANT(BONE_DIRECTION_PLUS_X);

+ 2 - 2
scene/animation/animation_blend_tree.cpp

@@ -384,9 +384,9 @@ void AnimationNodeAnimation::_bind_methods() {
 	ADD_PROPERTY(PropertyInfo(Variant::INT, "play_mode", PROPERTY_HINT_ENUM, "Forward,Backward"), "set_play_mode", "get_play_mode");
 	ADD_PROPERTY(PropertyInfo(Variant::INT, "play_mode", PROPERTY_HINT_ENUM, "Forward,Backward"), "set_play_mode", "get_play_mode");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "advance_on_start"), "set_advance_on_start", "is_advance_on_start");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "advance_on_start"), "set_advance_on_start", "is_advance_on_start");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_custom_timeline"), "set_use_custom_timeline", "is_using_custom_timeline");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_custom_timeline"), "set_use_custom_timeline", "is_using_custom_timeline");
-	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "timeline_length", PROPERTY_HINT_RANGE, "0.001,60,0.001,or_greater,or_less,hide_slider,suffix:s"), "set_timeline_length", "get_timeline_length");
+	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "timeline_length", PROPERTY_HINT_RANGE, "0.001,60,0.001,or_greater,or_less,hide_control,suffix:s"), "set_timeline_length", "get_timeline_length");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stretch_time_scale"), "set_stretch_time_scale", "is_stretching_time_scale");
 	ADD_PROPERTY(PropertyInfo(Variant::BOOL, "stretch_time_scale"), "set_stretch_time_scale", "is_stretching_time_scale");
-	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "-60,60,0.001,or_greater,or_less,hide_slider,suffix:s"), "set_start_offset", "get_start_offset");
+	ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "start_offset", PROPERTY_HINT_RANGE, "-60,60,0.001,or_greater,or_less,hide_control,suffix:s"), "set_start_offset", "get_start_offset");
 	ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Ping-Pong"), "set_loop_mode", "get_loop_mode");
 	ADD_PROPERTY(PropertyInfo(Variant::INT, "loop_mode", PROPERTY_HINT_ENUM, "None,Linear,Ping-Pong"), "set_loop_mode", "get_loop_mode");
 
 
 	BIND_ENUM_CONSTANT(PLAY_MODE_FORWARD);
 	BIND_ENUM_CONSTANT(PLAY_MODE_FORWARD);