mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed a regression where the graying-out of menu entries didn't work.
This commit is contained in:
parent
6e2c8d4f32
commit
107c747374
|
@ -336,10 +336,11 @@ void Window::render()
|
||||||
}
|
}
|
||||||
if (Settings::getInstance()->getString("MenuOpeningEffect") == "fade-in") {
|
if (Settings::getInstance()->getString("MenuOpeningEffect") == "fade-in") {
|
||||||
// Fade-in menu.
|
// Fade-in menu.
|
||||||
if (mTopOpacity < 255)
|
if (mTopOpacity < 255) {
|
||||||
mTopOpacity = Math::clamp(mTopOpacity+15, 0, 255);
|
mTopOpacity = Math::clamp(mTopOpacity+15, 0, 255);
|
||||||
top->setOpacity(mTopOpacity);
|
top->setOpacity(mTopOpacity);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
top->render(transform);
|
top->render(transform);
|
||||||
|
|
|
@ -229,7 +229,6 @@ void ComponentList::render(const Transform4x4f& parentTrans)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
it->component->setOpacity(mOpacity);
|
|
||||||
it->component->render(trans);
|
it->component->render(trans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -118,6 +118,12 @@ void NinePatchComponent::render(const Transform4x4f& parentTrans)
|
||||||
mVertices[0].shaders = Renderer::SHADER_OPACITY;
|
mVertices[0].shaders = Renderer::SHADER_OPACITY;
|
||||||
mVertices[0].opacity = mOpacity / 255.0;
|
mVertices[0].opacity = mOpacity / 255.0;
|
||||||
}
|
}
|
||||||
|
else if (mVertices[0].shaders & Renderer::SHADER_OPACITY) {
|
||||||
|
// We have reached full opacity, so disable the opacity shader and set
|
||||||
|
// the vertex opacity to 1.0.
|
||||||
|
mVertices[0].shaders ^= Renderer::SHADER_OPACITY;
|
||||||
|
mVertices[0].opacity = 1.0;
|
||||||
|
}
|
||||||
mTexture->bind();
|
mTexture->bind();
|
||||||
Renderer::drawTriangleStrips(&mVertices[0], 6*9, trans);
|
Renderer::drawTriangleStrips(&mVertices[0], 6*9, trans);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue