Implement clipping

This commit is contained in:
2026-09-08 21:15:21 +02:00
parent aec9083ebb
commit 0dbf430c0c
16 changed files with 66 additions and 9 deletions
+2 -2
View File
@@ -172,7 +172,7 @@ PD_API void Layout::Update() {
it->HandleInput();
it->UnlockInput();
if (Flags & UI7LayoutFlags_UseClipRect) {
it->SetClipRect(fvec4(Pos, Size));
it->SetClipRect(fvec4(Pos.x, Pos.y, Size.x, Size.y));
}
it->PreDraw();
it->Draw();
@@ -201,7 +201,7 @@ PD_API void Layout::Label(const std::string& label) {
// Layout API
auto r = IO.LabelPool.Allocate();
*r = UI7::Label(label, IO);
r->SetClipRect(fvec4(GetPosition(), GetPosition() + GetSize()));
// r->SetClipRect(fvec4(GetPosition(), GetSize()));
AddObject(r);
}