From 56aae0e8bcb0f91931ae3d48b74e7dd42d87861a Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 21 Jan 2020 22:56:19 +0100 Subject: [PATCH] Use a loading placeholder for project icons in the project manager Now that projects are loaded asynchronously, some projects in the list may be displayed before their icon is done loading. This is especially common on slower hardware. In such cases, this makes the project manager display a loading placeholder instead of the default project icon. --- editor/project_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 9bbb9bd38c4..30e31cb530f 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -1313,7 +1313,9 @@ void ProjectList::create_project_item_control(int p_index) { hb->set_is_favorite(item.favorite); TextureRect *tf = memnew(TextureRect); - tf->set_texture(get_icon("DefaultProjectIcon", "EditorIcons")); + // The project icon may not be loaded by the time the control is displayed, + // so use a loading placeholder. + tf->set_texture(get_icon("ProjectIconLoading", "EditorIcons")); if (item.missing) { tf->set_modulate(Color(1, 1, 1, 0.5)); }