Commit 9aaa5e79 authored by Aloshi's avatar Aloshi

Fixed missing bottom spacer on ComponentLists.

parent 7f62b06d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment