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
@@ -61,7 +61,7 @@ void EditorResourcePicker::_update_resource() {
if (edited_resource == Ref<Resource>()) {
assign_button->set_icon(Ref<Texture2D>());
assign_button->set_text(TTR("[empty]"));
assign_button->set_text(TTR("<empty>"));
assign_button->set_tooltip_text("");
} else {
assign_button->set_icon(EditorNode::get_singleton()->get_object_icon(edited_resource.operator->(), "Object"));
@@ -1113,7 +1113,7 @@ void EditorAudioStreamPicker::_update_resource() {
void EditorAudioStreamPicker::_preview_draw() {
Ref<AudioStream> audio_stream = get_edited_resource();
if (!audio_stream.is_valid()) {
get_assign_button()->set_text(TTR("[empty]"));
get_assign_button()->set_text(TTR("<empty>"));
return;
}