mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +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.
|
||||
const float sizeX {mItemSize.x * scale * mSelectorRelativeScale};
|
||||
const float sizeY {mItemSize.y * scale * mSelectorRelativeScale};
|
||||
mRenderer->setMatrix(trans);
|
||||
mRenderer->drawRect(position.x, position.y, sizeX, sizeY, mSelectorColor,
|
||||
mSelectorColorEnd, mSelectorColorGradientHorizontal, opacity);
|
||||
const glm::mat4 drawTrans {
|
||||
glm::translate(trans, glm::round(glm::vec3 {position.x, position.y, 0.0f}))};
|
||||
mRenderer->setMatrix(drawTrans);
|
||||
mRenderer->drawRect(0.0f, 0.0f, sizeX, sizeY, mSelectorColor, mSelectorColorEnd,
|
||||
mSelectorColorGradientHorizontal, opacity);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue