From 2a3d78bef2d1b9f7eef2d0fa30947d14f0b40ecc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 6 Aug 2020 16:48:32 +0200 Subject: [PATCH] Text opacity is now lowered for games marked not to be counted, and for hidden games. --- es-core/src/components/TextListComponent.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/es-core/src/components/TextListComponent.h b/es-core/src/components/TextListComponent.h index 667eb531a..a39137bf1 100644 --- a/es-core/src/components/TextListComponent.h +++ b/es-core/src/components/TextListComponent.h @@ -157,7 +157,7 @@ void TextListComponent::render(const Transform4x4f& parentTrans) int startEntry = 0; - // Number of entries that can fit on the screen simultaniously. + // Number of entries that can fit on the screen simultaneously. int screenCount = (int)(mSize.y() / entrySize + 0.5f); if (size() >= screenCount) { @@ -216,7 +216,14 @@ void TextListComponent::render(const Transform4x4f& parentTrans) (font->buildTextCache(mUppercase ? Utils::String::toUpper(entry.name) : entry.name, 0, 0, 0x000000FF)); - entry.data.textCache->setColor(color); + // If a game is marked as hidden, lower the text opacity quite a lot. + // For games marked not to be counted, lower the opacity moderately. + if (entry.object->getHidden()) + entry.data.textCache->setColor(color & 0xFFFFFF33); + else if (!entry.object->getCountAsGame()) + entry.data.textCache->setColor(color & 0xFFFFFF77); + else + entry.data.textCache->setColor(color); Vector3f offset(0, y, 0);