1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Improve error reporting in the asset library and in related types

This also makes errors related to asset image loading
verbose-only, because, frankly, users can't do much about
those errors. Spamming them with error messages
about some assets on the frontend being broken
is pointless.
This commit is contained in:
Yuri Sizov
2024-01-26 20:33:22 +01:00
parent 17e7f85c06
commit 815038962f
7 changed files with 133 additions and 90 deletions

View File

@@ -255,14 +255,15 @@ class EditorAssetLibrary : public PanelContainer {
String image_url;
HTTPRequest *request = nullptr;
ObjectID target;
int asset_id = -1;
};
int last_queue_id;
HashMap<int, ImageQueue> image_queue;
void _image_update(bool use_cache, bool final, const PackedByteArray &p_data, int p_queue_id);
void _image_update(bool p_use_cache, bool p_final, const PackedByteArray &p_data, int p_queue_id);
void _image_request_completed(int p_status, int p_code, const PackedStringArray &headers, const PackedByteArray &p_data, int p_queue_id);
void _request_image(ObjectID p_for, String p_image_url, ImageType p_type, int p_image_index);
void _request_image(ObjectID p_for, int p_asset_id, String p_image_url, ImageType p_type, int p_image_index);
void _update_image_queue();
HBoxContainer *_make_pages(int p_page, int p_page_count, int p_page_len, int p_total_items, int p_current_items);