mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fixed an issue where the grid component selector position was not always calculated correctly
This commit is contained in:
parent
0c5e296103
commit
26b7945171
|
@ -773,9 +773,11 @@ template <typename T> void GridComponent<T>::render(const glm::mat4& parentTrans
|
||||||
// If a selector color is set but no selector image, then render a rectangle.
|
// If a selector color is set but no selector image, then render a rectangle.
|
||||||
const float sizeX {mItemSize.x * scale * mSelectorRelativeScale};
|
const float sizeX {mItemSize.x * scale * mSelectorRelativeScale};
|
||||||
const float sizeY {mItemSize.y * scale * mSelectorRelativeScale};
|
const float sizeY {mItemSize.y * scale * mSelectorRelativeScale};
|
||||||
mRenderer->setMatrix(trans);
|
const glm::mat4 drawTrans {
|
||||||
mRenderer->drawRect(position.x, position.y, sizeX, sizeY, mSelectorColor,
|
glm::translate(trans, glm::round(glm::vec3 {position.x, position.y, 0.0f}))};
|
||||||
mSelectorColorEnd, mSelectorColorGradientHorizontal, opacity);
|
mRenderer->setMatrix(drawTrans);
|
||||||
|
mRenderer->drawRect(0.0f, 0.0f, sizeX, sizeY, mSelectorColor, mSelectorColorEnd,
|
||||||
|
mSelectorColorGradientHorizontal, opacity);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue