mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-17 04:25:58 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user