diff options
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r-- | editor/editor_properties.cpp | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index e0ef592ce7..b495d29911 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -110,9 +110,6 @@ EditorPropertyText::EditorPropertyText() { add_focusable(text); text->connect("text_changed", callable_mp(this, &EditorPropertyText::_text_changed)); text->connect("text_submitted", callable_mp(this, &EditorPropertyText::_text_submitted)); - - string_name = false; - updating = false; } ///////////////////// MULTILINE TEXT ///////////////////////// @@ -500,9 +497,6 @@ EditorPropertyPath::EditorPropertyPath() { add_focusable(path); dialog = nullptr; path_edit->connect("pressed", callable_mp(this, &EditorPropertyPath::_path_pressed)); - folder = false; - global = false; - save_mode = false; } ///////////////////// CLASS NAME ///////////////////////// @@ -1185,7 +1179,7 @@ void EditorPropertyLayers::_button_pressed() { } Rect2 gp = button->get_screen_rect(); - layers->set_as_minsize(); + layers->reset_size(); Vector2 popup_pos = gp.position - Vector2(layers->get_contents_minimum_size().x, 0); layers->set_position(popup_pos); layers->popup(); @@ -1278,7 +1272,6 @@ EditorPropertyInteger::EditorPropertyInteger() { add_child(spin); add_focusable(spin); spin->connect("value_changed", callable_mp(this, &EditorPropertyInteger::_value_changed)); - setting = false; } ///////////////////// OBJECT ID ///////////////////////// @@ -1587,10 +1580,6 @@ EditorPropertyEasing::EditorPropertyEasing() { spin->get_line_edit()->connect("focus_exited", callable_mp(this, &EditorPropertyEasing::_spin_focus_exited)); spin->hide(); add_child(spin); - - dragging = false; - flip = false; - full = false; } ///////////////////// VECTOR2 ///////////////////////// @@ -1680,7 +1669,6 @@ EditorPropertyVector2::EditorPropertyVector2(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// RECT2 ///////////////////////// @@ -1784,7 +1772,6 @@ EditorPropertyRect2::EditorPropertyRect2(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// VECTOR3 ///////////////////////// @@ -1993,7 +1980,6 @@ EditorPropertyVector2i::EditorPropertyVector2i(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// RECT2i ///////////////////////// @@ -2097,7 +2083,6 @@ EditorPropertyRect2i::EditorPropertyRect2i(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// VECTOR3i ///////////////////////// @@ -2188,7 +2173,6 @@ EditorPropertyVector3i::EditorPropertyVector3i(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// PLANE ///////////////////////// @@ -2282,7 +2266,6 @@ EditorPropertyPlane::EditorPropertyPlane(bool p_force_wide) { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// QUATERNION ///////////////////////// @@ -2373,7 +2356,6 @@ EditorPropertyQuaternion::EditorPropertyQuaternion() { if (!horizontal) { set_label_reference(spin[0]); //show text and buttons around this } - setting = false; } ///////////////////// AABB ///////////////////////// @@ -2457,7 +2439,6 @@ EditorPropertyAABB::EditorPropertyAABB() { spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyAABB::_value_changed), varray(desc[i])); } set_bottom_editor(g); - setting = false; } ///////////////////// TRANSFORM2D ///////////////////////// @@ -2547,7 +2528,6 @@ EditorPropertyTransform2D::EditorPropertyTransform2D(bool p_include_origin) { spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform2D::_value_changed), varray(desc[i])); } set_bottom_editor(g); - setting = false; } ///////////////////// BASIS ///////////////////////// @@ -2636,7 +2616,6 @@ EditorPropertyBasis::EditorPropertyBasis() { spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyBasis::_value_changed), varray(desc[i])); } set_bottom_editor(g); - setting = false; } ///////////////////// TRANSFORM ///////////////////////// @@ -2733,7 +2712,6 @@ EditorPropertyTransform3D::EditorPropertyTransform3D() { spin[i]->connect("value_changed", callable_mp(this, &EditorPropertyTransform3D::_value_changed), varray(desc[i])); } set_bottom_editor(g); - setting = false; } ////////////// COLOR PICKER ////////////////////// @@ -2969,7 +2947,6 @@ EditorPropertyNodePath::EditorPropertyNodePath() { clear->set_flat(true); clear->connect("pressed", callable_mp(this, &EditorPropertyNodePath::_node_clear)); hbc->add_child(clear); - use_path_from_scene_root = false; scene_tree = nullptr; //do not allocate unnecessarily } @@ -3059,7 +3036,7 @@ void EditorPropertyResource::_sub_inspector_property_keyed(const String &p_prope // The second parameter could be null, causing the event to fire with less arguments, so use the pointer call which preserves it. const Variant args[3] = { String(get_edited_property()) + ":" + p_property, p_value, p_advance }; const Variant *argp[3] = { &args[0], &args[1], &args[2] }; - emit_signal(SNAME("property_keyed_with_value"), argp, 3); + emit_signalp(SNAME("property_keyed_with_value"), argp, 3); } void EditorPropertyResource::_sub_inspector_resource_selected(const RES &p_resource, const String &p_property) { @@ -3738,8 +3715,13 @@ EditorProperty *EditorInspectorDefaultPlugin::get_editor_for_property(Object *p_ } break; case Variant::DICTIONARY: { - EditorPropertyDictionary *editor = memnew(EditorPropertyDictionary); - return editor; + if (p_hint == PROPERTY_HINT_LOCALIZABLE_STRING) { + EditorPropertyLocalizableString *editor = memnew(EditorPropertyLocalizableString); + return editor; + } else { + EditorPropertyDictionary *editor = memnew(EditorPropertyDictionary); + return editor; + } } break; case Variant::ARRAY: { EditorPropertyArray *editor = memnew(EditorPropertyArray); |