diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-08-27 19:20:54 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-08-27 19:45:25 +0200 |
commit | 89c13c3ae92e52d839079cb9d26b794340002b7f (patch) | |
tree | ab4bb0fa4e7ea7a7704e305ecadae09f2e12deae | |
parent | b7c46ed9298b6be4d61574979f686f59b8313be0 (diff) |
Display a "broken file" icon for missing images in the asset library
This partially addresses #31683.
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 3eea888950..ebcbe62e9d 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -404,7 +404,7 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse icon->set_texture(p_preview); asset_id = p_asset_id; if (!p_preview.is_valid()) - icon->set_texture(get_icon("DefaultProjectIcon", "EditorIcons")); + icon->set_texture(get_icon("FileBrokenBigThumb", "EditorIcons")); host = p_download_url; sha256 = p_sha256_hash; _make_request(); @@ -770,7 +770,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt } if (!image_set && final) { - obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons")); + obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("FileBrokenBigThumb", "EditorIcons")); } } } @@ -815,7 +815,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons WARN_PRINTS("Error getting image file from URL: " + image_queue[p_queue_id].image_url); Object *obj = ObjectDB::get_instance(image_queue[p_queue_id].target); if (obj) { - obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons")); + obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("FileBrokenBigThumb", "EditorIcons")); } } |