Fix Render discard issue [pd-3ds]

- Clip Rects do now not discard when they move out of screen (cause the maths ends in < 0 which is not working with u32)
- Fixing ui7 crash wehn im input was nullptr
This commit is contained in:
2026-03-10 18:57:29 +01:00
parent 97efca5173
commit 02d2200edd
6 changed files with 15 additions and 11 deletions

View File

@@ -38,6 +38,7 @@ class PD_API Image : public Container {
* @param size Custom Size of the Image
*/
Image(Li::Texture::Ref img, fvec2 size = 0.f, Li::Rect uv = fvec4(0.f)) {
if (!img) return;
this->img = img;
if (size == fvec2(0.f)) {
size = img->GetSize();
@@ -60,9 +61,9 @@ class PD_API Image : public Container {
void Draw() override;
private:
Li::Texture::Ref img; ///< Texture reference to the Image
fvec2 newsize = 0.f; ///< New Size
Li::Rect cuv; ///< Custom UV
Li::Texture::Ref img = nullptr; ///< Texture reference to the Image
fvec2 newsize = 0.f; ///< New Size
Li::Rect cuv; ///< Custom UV
};
} // namespace UI7
} // namespace PD