mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-29 01:25:38 +00:00
Prevented some unnecessary badge rendering.
This commit is contained in:
parent
4f88909eff
commit
3f9023885e
|
@ -183,7 +183,7 @@ const std::string BadgeComponent::getDisplayName(const std::string& shortName)
|
||||||
|
|
||||||
void BadgeComponent::render(const glm::mat4& parentTrans)
|
void BadgeComponent::render(const glm::mat4& parentTrans)
|
||||||
{
|
{
|
||||||
if (!isVisible() || mThemeOpacity == 0.0f)
|
if (!isVisible() || mFlexboxItems.empty() || mOpacity == 0.0f || mThemeOpacity == 0.0f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mOpacity * mThemeOpacity == 1.0f) {
|
if (mOpacity * mThemeOpacity == 1.0f) {
|
||||||
|
|
|
@ -34,7 +34,7 @@ FlexboxComponent::FlexboxComponent(std::vector<FlexboxItem>& items)
|
||||||
|
|
||||||
void FlexboxComponent::render(const glm::mat4& parentTrans)
|
void FlexboxComponent::render(const glm::mat4& parentTrans)
|
||||||
{
|
{
|
||||||
if (!isVisible())
|
if (!isVisible() || mOpacity == 0.0f || mThemeOpacity == 0.0f)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!mLayoutValid)
|
if (!mLayoutValid)
|
||||||
|
|
Loading…
Reference in a new issue