You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Hide EditorSpinSlider slider for VectorNI
This commit is contained in:
@@ -3663,7 +3663,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
|
||||
case Variant::VECTOR2I: {
|
||||
EditorPropertyVector2i *editor = memnew(EditorPropertyVector2i(p_wide));
|
||||
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix, false, true);
|
||||
return editor;
|
||||
|
||||
} break;
|
||||
@@ -3690,7 +3690,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
|
||||
case Variant::VECTOR3I: {
|
||||
EditorPropertyVector3i *editor = memnew(EditorPropertyVector3i(p_wide));
|
||||
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix, false, true);
|
||||
return editor;
|
||||
|
||||
} break;
|
||||
@@ -3704,7 +3704,7 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_
|
||||
case Variant::VECTOR4I: {
|
||||
EditorPropertyVector4i *editor = memnew(EditorPropertyVector4i);
|
||||
EditorPropertyRangeHint hint = _parse_range_hint(p_hint, p_hint_text, 1, true);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix);
|
||||
editor->setup(hint.min, hint.max, 1, false, p_hint == PROPERTY_HINT_LINK, hint.suffix, false, true);
|
||||
return editor;
|
||||
|
||||
} break;
|
||||
|
||||
@@ -153,7 +153,7 @@ 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) {
|
||||
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) {
|
||||
radians_as_degrees = p_radians_as_degrees;
|
||||
|
||||
for (EditorSpinSlider *spin : spin_sliders) {
|
||||
@@ -164,6 +164,7 @@ void EditorPropertyVectorN::setup(double p_min, double p_max, double p_step, boo
|
||||
spin->set_allow_greater(true);
|
||||
spin->set_allow_lesser(true);
|
||||
spin->set_suffix(p_suffix);
|
||||
spin->set_editing_integer(p_is_int);
|
||||
}
|
||||
|
||||
if (!p_link) {
|
||||
|
||||
@@ -62,7 +62,7 @@ protected:
|
||||
|
||||
public:
|
||||
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);
|
||||
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);
|
||||
EditorPropertyVectorN(Variant::Type p_type, bool p_force_wide, bool p_horizontal);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user