mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed an issue where the menus would sometimes contain fractional rows
This commit is contained in:
parent
8ecc7cfce2
commit
e13cac5f0b
|
@ -239,9 +239,10 @@ void ComponentList::render(const glm::mat4& parentTrans)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
glm::mat4 trans {parentTrans * getTransform()};
|
glm::mat4 trans {parentTrans * getTransform()};
|
||||||
|
int overflow {(static_cast<int>(std::round(mSize.y)) % static_cast<int>(mRowHeight))};
|
||||||
|
|
||||||
// Clip everything to be inside our bounds.
|
// Clip everything to be inside our bounds.
|
||||||
glm::vec3 dim {mSize.x, mSize.y, 0.0f};
|
glm::vec3 dim {mSize.x, mSize.y - overflow, 0.0f};
|
||||||
dim.x = (trans[0].x * dim.x + trans[3].x) - trans[3].x;
|
dim.x = (trans[0].x * dim.x + trans[3].x) - trans[3].x;
|
||||||
dim.y = (trans[1].y * dim.y + trans[3].y) - trans[3].y;
|
dim.y = (trans[1].y * dim.y + trans[3].y) - trans[3].y;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue