Improve null and object printing to avoid confusion with arrays

- Use different syntax for object printing to avoid confusion with arrays.
- Print null as `<null>` to avoid confusion with a string `"null"`.
- Display `<empty>` in editor resource pickers to avoid confusion
  with array-based properties.
This commit is contained in:
Hugo Locurcio
2022-08-31 15:31:49 +02:00
parent de5f13e935
commit 291d3aaabe
8 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -52,7 +52,7 @@ void EditorPropertyNil::update_property() {
EditorPropertyNil::EditorPropertyNil() {
Label *label = memnew(Label);
label->set_text("[null]");
label->set_text("<null>");
add_child(label);
}
@@ -1382,7 +1382,7 @@ void EditorPropertyObjectID::update_property() {
edit->set_disabled(false);
edit->set_icon(EditorNode::get_singleton()->get_class_icon(type));
} else {
edit->set_text(TTR("[Empty]"));
edit->set_text(TTR("<empty>"));
edit->set_disabled(true);
edit->set_icon(Ref<Texture2D>());
}