System view extras are now clipped (can no longer overflow into other views).

This commit is contained in:
Aloshi 2014-06-07 11:18:24 -05:00
parent f141dd256c
commit 8efbc953d0

View file

@ -277,8 +277,11 @@ void SystemView::render(const Eigen::Affine3f& parentTrans)
index -= mEntries.size(); index -= mEntries.size();
extrasTrans.translation() = trans.translation() + Eigen::Vector3f((i - mExtrasCamOffset) * mSize.x(), 0, 0); extrasTrans.translation() = trans.translation() + Eigen::Vector3f((i - mExtrasCamOffset) * mSize.x(), 0, 0);
Eigen::Vector2i clipRect = Eigen::Vector2i((int)((i - mExtrasCamOffset) * mSize.x()), 0);
Renderer::pushClipRect(clipRect, mSize.cast<int>());
mEntries.at(index).data.backgroundExtras->render(extrasTrans); mEntries.at(index).data.backgroundExtras->render(extrasTrans);
Renderer::popClipRect();
} }
// fade extras if necessary // fade extras if necessary