aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_properties.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2018-05-19 16:09:38 -0300
committerJuan Linietsky2018-05-19 16:10:19 -0300
commiteded06166860b3c052310cc8db28cc080655b510 (patch)
tree84a0459f5f925afe59b72f668499386db9165a7d /editor/editor_properties.cpp
parent228b09bafbad467389dd851699df1a327fbdea21 (diff)
downloadgodot-eded06166860b3c052310cc8db28cc080655b510.tar.gz
godot-eded06166860b3c052310cc8db28cc080655b510.tar.zst
godot-eded06166860b3c052310cc8db28cc080655b510.zip
Dictionary editing does the comeback to the inspector, fixes #19046
Diffstat (limited to 'editor/editor_properties.cpp')
-rw-r--r--editor/editor_properties.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index 812e461a1..45e0df7ed 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -31,7 +31,20 @@
#include "editor_properties.h"
#include "editor/editor_resource_preview.h"
#include "editor_node.h"
+#include "editor_properties_array_dict.h"
#include "scene/main/viewport.h"
+
+///////////////////// NULL /////////////////////////
+
+void EditorPropertyNil::update_property() {
+}
+
+EditorPropertyNil::EditorPropertyNil() {
+ Label *label = memnew(Label);
+ label->set_text("[null]");
+ add_child(label);
+}
+
///////////////////// TEXT /////////////////////////
void EditorPropertyText::_text_changed(const String &p_string) {
if (updating)
@@ -2273,6 +2286,10 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
switch (p_type) {
// atomic types
+ case Variant::NIL: {
+ EditorPropertyNil *editor = memnew(EditorPropertyNil);
+ add_property_editor(p_path, editor);
+ } break;
case Variant::BOOL: {
EditorPropertyCheck *editor = memnew(EditorPropertyCheck);
add_property_editor(p_path, editor);
@@ -2633,22 +2650,36 @@ bool EditorInspectorDefaultPlugin::parse_property(Object *p_object, Variant::Typ
case Variant::DICTIONARY: {
} break;
case Variant::ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
-
- // arrays
case Variant::POOL_BYTE_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break; // 20
case Variant::POOL_INT_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
case Variant::POOL_REAL_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
case Variant::POOL_STRING_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
case Variant::POOL_VECTOR2_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
case Variant::POOL_VECTOR3_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break; // 25
case Variant::POOL_COLOR_ARRAY: {
+ EditorPropertyArray *editor = memnew(EditorPropertyArray);
+ add_property_editor(p_path, editor);
} break;
default: {}
}