mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Tiny optimization in GridComponent.
This commit is contained in:
parent
7cad629240
commit
1ff82d535e
|
@ -786,10 +786,12 @@ template <typename T> void GridComponent<T>::render(const glm::mat4& parentTrans
|
||||||
if (mHasTextSelectedColor && mEntries.at(*it).data.imagePath == "" &&
|
if (mHasTextSelectedColor && mEntries.at(*it).data.imagePath == "" &&
|
||||||
mEntries.at(*it).data.defaultImagePath == "") {
|
mEntries.at(*it).data.defaultImagePath == "") {
|
||||||
mEntries.at(*it).data.item->setColor(mTextSelectedColor);
|
mEntries.at(*it).data.item->setColor(mTextSelectedColor);
|
||||||
mEntries.at(*it).data.item->setBackgroundColor(mTextSelectedBackgroundColor);
|
if (mTextSelectedBackgroundColor != mTextBackgroundColor)
|
||||||
|
mEntries.at(*it).data.item->setBackgroundColor(mTextSelectedBackgroundColor);
|
||||||
mEntries.at(*it).data.item->render(trans);
|
mEntries.at(*it).data.item->render(trans);
|
||||||
mEntries.at(*it).data.item->setColor(mTextColor);
|
mEntries.at(*it).data.item->setColor(mTextColor);
|
||||||
mEntries.at(*it).data.item->setBackgroundColor(mTextBackgroundColor);
|
if (mTextSelectedBackgroundColor != mTextBackgroundColor)
|
||||||
|
mEntries.at(*it).data.item->setBackgroundColor(mTextBackgroundColor);
|
||||||
}
|
}
|
||||||
else if (mHasImageSelectedColor) {
|
else if (mHasImageSelectedColor) {
|
||||||
mEntries.at(*it).data.item->setColorShift(mImageSelectedColor);
|
mEntries.at(*it).data.item->setColorShift(mImageSelectedColor);
|
||||||
|
|
Loading…
Reference in a new issue