mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25:38 +00:00
Merge pull request #150 from jrassa/render-overflow-fixes
use clip rects to prevent views overflow onto other views
This commit is contained in:
commit
e28e679e2d
|
@ -455,6 +455,7 @@ void SystemView::renderExtras(const Eigen::Affine3f& trans, float lower, float u
|
|||
else
|
||||
extrasTrans.translate(Eigen::Vector3f(0, (i - mExtrasCamOffset) * mSize.y(), 0));
|
||||
|
||||
Renderer::pushClipRect(Eigen::Vector2i(extrasTrans.translation()[0], extrasTrans.translation()[1]), mSize.cast<int>());
|
||||
SystemViewData data = mEntries.at(index).data;
|
||||
for(unsigned int j = 0; j < data.backgroundExtras.size(); j++)
|
||||
{
|
||||
|
@ -463,6 +464,7 @@ void SystemView::renderExtras(const Eigen::Affine3f& trans, float lower, float u
|
|||
extra->render(extrasTrans);
|
||||
}
|
||||
}
|
||||
Renderer::popClipRect();
|
||||
}
|
||||
Renderer::popClipRect();
|
||||
}
|
||||
|
|
|
@ -41,3 +41,11 @@ HelpStyle IGameListView::getHelpStyle()
|
|||
style.applyTheme(mTheme, getName());
|
||||
return style;
|
||||
}
|
||||
|
||||
void IGameListView::render(const Eigen::Affine3f& parentTrans)
|
||||
{
|
||||
Eigen::Affine3f trans = parentTrans * getTransform();
|
||||
Renderer::pushClipRect(Eigen::Vector2i(trans.translation()[0],trans.translation()[1]), Eigen::Vector2i(Renderer::getScreenWidth(), Renderer::getScreenHeight()));
|
||||
renderChildren(trans);
|
||||
Renderer::popClipRect();
|
||||
}
|
||||
|
|
|
@ -37,6 +37,8 @@ public:
|
|||
virtual const char* getName() const = 0;
|
||||
|
||||
virtual HelpStyle getHelpStyle() override;
|
||||
|
||||
void render(const Eigen::Affine3f& parentTrans) override;
|
||||
protected:
|
||||
FileData* mRoot;
|
||||
std::shared_ptr<ThemeData> mTheme;
|
||||
|
|
Loading…
Reference in a new issue