|
@@ -1185,21 +1185,39 @@ void EditorPropertyRect2::setup(double p_min, double p_max, double p_step, bool
|
|
|
}
|
|
|
|
|
|
EditorPropertyRect2::EditorPropertyRect2() {
|
|
|
- VBoxContainer *vb = memnew(VBoxContainer);
|
|
|
- add_child(vb);
|
|
|
+
|
|
|
+ bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
|
|
|
+
|
|
|
+ BoxContainer *bc;
|
|
|
+
|
|
|
+ if (horizontal) {
|
|
|
+ bc = memnew(HBoxContainer);
|
|
|
+ add_child(bc);
|
|
|
+ set_bottom_editor(bc);
|
|
|
+ } else {
|
|
|
+ bc = memnew(VBoxContainer);
|
|
|
+ add_child(bc);
|
|
|
+ }
|
|
|
+
|
|
|
static const char *desc[4] = { "x", "y", "w", "h" };
|
|
|
for (int i = 0; i < 4; i++) {
|
|
|
spin[i] = memnew(EditorSpinSlider);
|
|
|
spin[i]->set_label(desc[i]);
|
|
|
spin[i]->set_flat(true);
|
|
|
-
|
|
|
- vb->add_child(spin[i]);
|
|
|
+ bc->add_child(spin[i]);
|
|
|
add_focusable(spin[i]);
|
|
|
spin[i]->connect("value_changed", this, "_value_changed");
|
|
|
+ if (horizontal) {
|
|
|
+ spin[i]->set_h_size_flags(SIZE_EXPAND_FILL);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!horizontal) {
|
|
|
+ set_label_reference(spin[0]); //show text and buttons around this
|
|
|
}
|
|
|
- set_label_reference(spin[0]); //show text and buttons around this
|
|
|
setting = false;
|
|
|
}
|
|
|
+
|
|
|
///////////////////// VECTOR3 /////////////////////////
|
|
|
|
|
|
void EditorPropertyVector3::_value_changed(double val) {
|
|
@@ -1247,7 +1265,7 @@ void EditorPropertyVector3::setup(double p_min, double p_max, double p_step, boo
|
|
|
}
|
|
|
|
|
|
EditorPropertyVector3::EditorPropertyVector3() {
|
|
|
- bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector3_editing");
|
|
|
+ bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
|
|
|
|
|
|
BoxContainer *bc;
|
|
|
|
|
@@ -1328,7 +1346,7 @@ void EditorPropertyPlane::setup(double p_min, double p_max, double p_step, bool
|
|
|
|
|
|
EditorPropertyPlane::EditorPropertyPlane() {
|
|
|
|
|
|
- bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector3_editing");
|
|
|
+ bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
|
|
|
|
|
|
BoxContainer *bc;
|
|
|
|
|
@@ -1409,7 +1427,7 @@ void EditorPropertyQuat::setup(double p_min, double p_max, double p_step, bool p
|
|
|
}
|
|
|
|
|
|
EditorPropertyQuat::EditorPropertyQuat() {
|
|
|
- bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector3_editing");
|
|
|
+ bool horizontal = EDITOR_GET("interface/inspector/horizontal_vector_types_editing");
|
|
|
|
|
|
BoxContainer *bc;
|
|
|
|