Merge pull request #35419 from Calinou/project-manager-loading-placeholder

Use a loading placeholder for project icons in the project manager
This commit is contained in:
Rémi Verschelde 2020-01-22 07:29:21 +01:00 committed by GitHub
commit 7c632968b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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));
}