UI: Centralize BG pic choosing a bit.

It's in several places.
This commit is contained in:
Unknown W. Brackets committed 2021-04-04 10:57:40 -07:00
1 parent e2a8c83b9f
commit f98bafb73d
4 files changed
+21 -36

No files matched your search

+3 -5
View File
@@ -236,11 +236,9 @@ void GameIconView::Draw(UIContext &dc) {
// Fade icon with the backgrounds.
double loadTime = info->icon.timeLoaded;
if (info->pic1.texture) {
loadTime = std::max(loadTime, info->pic1.timeLoaded);
}
if (info->pic0.texture) {
loadTime = std::max(loadTime, info->pic0.timeLoaded);
auto pic = info->GetBGPic();
if (pic) {
loadTime = std::max(loadTime, pic->timeLoaded);
}
uint32_t color = whiteAlpha(ease((time_now_d() - loadTime) * 3));