Fixed an issue where text coloring in menus would sometimes not get rendered correctly.

This commit is contained in:
Leon Styhre 2021-08-25 21:36:35 +02:00
parent da2e5f07f1
commit db1e595d11

View file

@ -198,7 +198,7 @@ void ComponentList::render(const glm::mat4& parentTrans)
// For the row where the cursor is at, we want to remove any hue from the
// font or image before inverting, as it would otherwise lead to an ugly
// inverted color (e.g. red inverting to a green hue).
if (i == mCursor && it->component->getValue() != "") {
if (mFocused && i == mCursor && it->component->getValue() != "") {
// Check if we're dealing with text or an image component.
bool isTextComponent = true;
unsigned int origColor = it->component->getColor();