From 0243b4bcf8fd69d69b3f9248b8241a6c7b820226 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 5 Apr 2021 13:26:25 +0200 Subject: [PATCH] Changed to static loading of the help icons to avoid texture pop-in. Also cleaned up some error logging for the help icon loading. --- es-core/src/components/HelpComponent.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/es-core/src/components/HelpComponent.cpp b/es-core/src/components/HelpComponent.cpp index d2eb37ec7..25308e546 100644 --- a/es-core/src/components/HelpComponent.cpp +++ b/es-core/src/components/HelpComponent.cpp @@ -121,16 +121,17 @@ std::shared_ptr HelpComponent::getIconTexture(const char* name) auto pathLookup = ICON_PATH_MAP.find(name); if (pathLookup == ICON_PATH_MAP.cend()) { - LOG(LogError) << "Unknown help icon \"" << name << "\"!"; + LOG(LogError) << "Unknown help icon \"" << name << "\""; return nullptr; } if (!ResourceManager::getInstance()->fileExists(pathLookup->second)) { - LOG(LogError) << "Help icon \"" << name << - "\" - corresponding image file \"" << pathLookup->second << "\" misisng!"; + LOG(LogError) << "Couldn't load help icon \"" << name << + "\" as the file \"" << pathLookup->second << "\" is missing"; return nullptr; } - std::shared_ptr tex = TextureResource::get(pathLookup->second); + std::shared_ptr tex = + TextureResource::get(pathLookup->second, false, false, false); mIconCache[std::string(name)] = tex; return tex; }