Skip to content
Snippets Groups Projects
Commit 4b80b3ea authored by Gino Valente's avatar Gino Valente
Browse files

Fix Clip not working for certain sizes/positions

This was due the x position surpassing the width of the element, but
this should not cause the element to not be clipped.
parent 135e513e
No related branches found
No related tags found
No related merge requests found
...@@ -597,7 +597,7 @@ impl Draw<TransparentUI> for DrawUI { ...@@ -597,7 +597,7 @@ impl Draw<TransparentUI> for DrawUI {
let mut height = extracted_quad.rect.height() as u32; let mut height = extracted_quad.rect.height() as u32;
width = width.min(window_size.0 as u32); width = width.min(window_size.0 as u32);
height = height.min(window_size.1 as u32); height = height.min(window_size.1 as u32);
if width == 0 || height == 0 || x > width || y > height { if width == 0 || height == 0 {
return; return;
} }
if x + width > window_size.0 as u32 { if x + width > window_size.0 as u32 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment