From 8efbc953d0b71a0a9e2b6391a659ecdca00e72d8 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Sat, 7 Jun 2014 11:18:24 -0500 Subject: [PATCH] System view extras are now clipped (can no longer overflow into other views). --- src/views/SystemView.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/views/SystemView.cpp b/src/views/SystemView.cpp index 1e8e6c63a..5e9b039cf 100644 --- a/src/views/SystemView.cpp +++ b/src/views/SystemView.cpp @@ -277,8 +277,11 @@ void SystemView::render(const Eigen::Affine3f& parentTrans) index -= mEntries.size(); 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()); mEntries.at(index).data.backgroundExtras->render(extrasTrans); + Renderer::popClipRect(); } // fade extras if necessary