mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Fixed missing bottom spacer on ComponentLists.
This commit is contained in:
parent
7f62b06d1a
commit
9aaa5e79d9
|
@ -162,7 +162,7 @@ void ComponentList::render(const Eigen::Affine3f& parentTrans)
|
|||
Eigen::Vector3f dim(mSize.x(), mSize.y(), 0);
|
||||
dim = trans * dim - trans.translation();
|
||||
Renderer::pushClipRect(Eigen::Vector2i((int)trans.translation().x(), (int)trans.translation().y()),
|
||||
Eigen::Vector2i((int)round(dim.x()), (int)round(dim.y())));
|
||||
Eigen::Vector2i((int)round(dim.x()), (int)round(dim.y() + 1)));
|
||||
|
||||
// scroll the camera
|
||||
trans.translate(Eigen::Vector3f(0, -round(mCameraOffset), 0));
|
||||
|
|
|
@ -50,16 +50,17 @@ void MenuComponent::updateSize()
|
|||
float height = TITLE_HEIGHT + mList->getTotalRowHeight() + getButtonGridHeight() + 2;
|
||||
if(height > maxHeight)
|
||||
{
|
||||
height = TITLE_HEIGHT + getButtonGridHeight() + 2;
|
||||
height = TITLE_HEIGHT + getButtonGridHeight();
|
||||
int i = 0;
|
||||
while(height < maxHeight && i < mList->size())
|
||||
while(i < mList->size())
|
||||
{
|
||||
float rowHeight = mList->getRowHeight(i);
|
||||
if(height + rowHeight < maxHeight)
|
||||
height += rowHeight;
|
||||
else
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
height += 2;
|
||||
}
|
||||
|
||||
setSize(Renderer::getScreenWidth() * 0.5f, height);
|
||||
|
|
Loading…
Reference in a new issue