summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2022-10-03 11:59:33 -0500
committerAaron Franke <arnfranke@yahoo.com>2022-10-03 13:40:31 -0500
commit094e8db97c3bb0f88aca32228a49f72cca745c9a (patch)
treeede391ec47605c1a4ae9da2047660f03a3f6ae2c /editor
parent1371a97acfb9263aaca7fa8642e95ba68534fa19 (diff)
Fix hide_slider vs no_slider inconsistency in editor property code
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_properties.cpp68
-rw-r--r--editor/editor_properties.h32
2 files changed, 49 insertions, 51 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 3b99962435..beb656823f 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1489,12 +1489,12 @@ void EditorPropertyFloat::update_property() {
void EditorPropertyFloat::_bind_methods() {
}
-void EditorPropertyFloat::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix, bool p_angle_in_radians) {
+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_angle_in_radians) {
angle_in_radians = p_angle_in_radians;
spin->set_min(p_min);
spin->set_max(p_max);
spin->set_step(p_step);
- spin->set_hide_slider(p_no_slider);
+ spin->set_hide_slider(p_hide_slider);
spin->set_exp_ratio(p_exp_range);
spin->set_allow_greater(p_greater);
spin->set_allow_lesser(p_lesser);
@@ -1797,12 +1797,12 @@ void EditorPropertyVector2::_notification(int p_what) {
}
}
-void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix) {
for (int i = 0; i < 2; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -1907,12 +1907,12 @@ void EditorPropertyRect2::_notification(int p_what) {
void EditorPropertyRect2::_bind_methods() {
}
-void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2078,13 +2078,13 @@ void EditorPropertyVector3::_notification(int p_what) {
void EditorPropertyVector3::_bind_methods() {
}
-void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link, const String &p_suffix, bool p_angle_in_radians) {
+void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link, const String &p_suffix, bool p_angle_in_radians) {
angle_in_radians = p_angle_in_radians;
for (int i = 0; i < 3; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2210,12 +2210,12 @@ void EditorPropertyVector2i::_notification(int p_what) {
}
}
-void EditorPropertyVector2i::setup(int p_min, int p_max, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector2i::setup(int p_min, int p_max, bool p_hide_slider, bool p_link, const String &p_suffix) {
for (int i = 0; i < 2; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2320,12 +2320,12 @@ void EditorPropertyRect2i::_notification(int p_what) {
void EditorPropertyRect2i::_bind_methods() {
}
-void EditorPropertyRect2i::setup(int p_min, int p_max, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyRect2i::setup(int p_min, int p_max, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2464,12 +2464,12 @@ void EditorPropertyVector3i::_notification(int p_what) {
void EditorPropertyVector3i::_bind_methods() {
}
-void EditorPropertyVector3i::setup(int p_min, int p_max, bool p_no_slider, bool p_link, const String &p_suffix) {
+void EditorPropertyVector3i::setup(int p_min, int p_max, bool p_hide_slider, bool p_link, const String &p_suffix) {
for (int i = 0; i < 3; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(1);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -2573,12 +2573,12 @@ void EditorPropertyPlane::_notification(int p_what) {
void EditorPropertyPlane::_bind_methods() {
}
-void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
}
@@ -2734,12 +2734,12 @@ void EditorPropertyQuaternion::_notification(int p_what) {
void EditorPropertyQuaternion::_bind_methods() {
}
-void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix, bool p_hide_editor) {
+void EditorPropertyQuaternion::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix, bool p_hide_editor) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
// Quaternion is inherently unitless, however someone may want to use it as
@@ -2882,16 +2882,14 @@ void EditorPropertyVector4::_notification(int p_what) {
void EditorPropertyVector4::_bind_methods() {
}
-void EditorPropertyVector4::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyVector4::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
- // Vector4 is inherently unitless, however someone may want to use it as
- // a generic way to store 4 values, so we'll still respect the suffix.
spin[i]->set_suffix(p_suffix);
}
}
@@ -2974,11 +2972,11 @@ void EditorPropertyVector4i::_notification(int p_what) {
void EditorPropertyVector4i::_bind_methods() {
}
-void EditorPropertyVector4i::setup(double p_min, double p_max, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyVector4i::setup(double p_min, double p_max, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 4; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -3069,12 +3067,12 @@ void EditorPropertyAABB::_notification(int p_what) {
void EditorPropertyAABB::_bind_methods() {
}
-void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyAABB::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 6; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
spin[i]->set_suffix(p_suffix);
@@ -3157,12 +3155,12 @@ void EditorPropertyTransform2D::_notification(int p_what) {
void EditorPropertyTransform2D::_bind_methods() {
}
-void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyTransform2D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 6; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 3 == 2) {
@@ -3249,12 +3247,12 @@ void EditorPropertyBasis::_notification(int p_what) {
void EditorPropertyBasis::_bind_methods() {
}
-void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyBasis::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 9; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
// Basis is inherently unitless, however someone may want to use it as
@@ -3347,12 +3345,12 @@ void EditorPropertyTransform3D::_notification(int p_what) {
void EditorPropertyTransform3D::_bind_methods() {
}
-void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyTransform3D::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 12; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 4 == 3) {
@@ -3453,12 +3451,12 @@ void EditorPropertyProjection::_notification(int p_what) {
void EditorPropertyProjection::_bind_methods() {
}
-void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix) {
+void EditorPropertyProjection::setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix) {
for (int i = 0; i < 16; i++) {
spin[i]->set_min(p_min);
spin[i]->set_max(p_max);
spin[i]->set_step(p_step);
- spin[i]->set_hide_slider(p_no_slider);
+ spin[i]->set_hide_slider(p_hide_slider);
spin[i]->set_allow_greater(true);
spin[i]->set_allow_lesser(true);
if (i % 4 == 3) {
@@ -4218,7 +4216,7 @@ static EditorPropertyRangeHint _parse_range_hint(PropertyHint p_hint, const Stri
hint.or_greater = true;
} else if (slice == "or_less") {
hint.or_less = true;
- } else if (slice == "no_slider") {
+ } else if (slice == "hide_slider") {
hint.hide_slider = true;
} else if (slice == "exp") {
hint.exp_range = true;
diff --git a/editor/editor_properties.h b/editor/editor_properties.h
index d6c9510634..9ad4c02111 100644
--- a/editor/editor_properties.h
+++ b/editor/editor_properties.h
@@ -433,7 +433,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_exp_range, bool p_greater, bool p_lesser, const String &p_suffix = String(), bool p_angle_in_radians = false);
+ 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_angle_in_radians = false);
EditorPropertyFloat();
};
@@ -496,7 +496,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector2(bool p_force_wide = false);
};
@@ -513,7 +513,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyRect2(bool p_force_wide = false);
};
@@ -541,7 +541,7 @@ public:
virtual void update_property() override;
virtual void update_using_vector(Vector3 p_vector);
virtual Vector3 get_vector();
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, bool p_link = false, const String &p_suffix = String(), bool p_angle_in_radians = false);
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, bool p_link = false, const String &p_suffix = String(), bool p_angle_in_radians = false);
EditorPropertyVector3(bool p_force_wide = false);
};
@@ -561,7 +561,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(int p_min, int p_max, bool p_hide_slider, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector2i(bool p_force_wide = false);
};
@@ -578,7 +578,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, const String &p_suffix = String());
+ void setup(int p_min, int p_max, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyRect2i(bool p_force_wide = false);
};
@@ -603,7 +603,7 @@ protected:
public:
virtual void update_property() override;
- void setup(int p_min, int p_max, bool p_no_slider, bool p_link = false, const String &p_suffix = String());
+ void setup(int p_min, int p_max, bool p_hide_slider, bool p_link = false, const String &p_suffix = String());
EditorPropertyVector3i(bool p_force_wide = false);
};
@@ -620,7 +620,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyPlane(bool p_force_wide = false);
};
@@ -654,7 +654,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_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_slider, const String &p_suffix = String(), bool p_hide_editor = false);
EditorPropertyQuaternion();
};
@@ -671,7 +671,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyVector4();
};
@@ -688,7 +688,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyVector4i();
};
@@ -705,7 +705,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyAABB();
};
@@ -722,7 +722,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyTransform2D(bool p_include_origin = true);
};
@@ -739,7 +739,7 @@ protected:
public:
virtual void update_property() override;
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyBasis();
};
@@ -757,7 +757,7 @@ protected:
public:
virtual void update_property() override;
virtual void update_using_transform(Transform3D p_transform);
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyTransform3D();
};
@@ -775,7 +775,7 @@ protected:
public:
virtual void update_property() override;
virtual void update_using_transform(Projection p_transform);
- void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String());
+ void setup(double p_min, double p_max, double p_step, bool p_hide_slider, const String &p_suffix = String());
EditorPropertyProjection();
};