Skip to content
Snippets Groups Projects
Commit 4b39e93f authored by StarArawn's avatar StarArawn
Browse files

Fixed up some rendering bugs with clips.

parent 1b51fb2d
No related branches found
No related tags found
No related merge requests found
...@@ -596,7 +596,7 @@ impl Draw<TransparentUI> for DrawUI { ...@@ -596,7 +596,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 { if width == 0 || height == 0 || x > width || y > height {
return; return;
} }
if x + width > window_size.0 as u32 { if x + width > window_size.0 as u32 {
......
...@@ -12,10 +12,10 @@ use kayak_ui::widgets::{App, Inspector, Window}; ...@@ -12,10 +12,10 @@ use kayak_ui::widgets::{App, Inspector, Window};
fn CustomWidget() { fn CustomWidget() {
rsx! { rsx! {
<> <>
<Window position={(50.0, 50.0)} size={(300.0, 300.0)} title={"Window 1".to_string()}> <Window draggable={true} position={(50.0, 50.0)} size={(300.0, 300.0)} title={"Window 1".to_string()}>
{} {}
</Window> </Window>
<Window position={(550.0, 50.0)} size={(200.0, 200.0)} title={"Window 2".to_string()}> <Window draggable={true} position={(550.0, 50.0)} size={(200.0, 200.0)} title={"Window 2".to_string()}>
{} {}
</Window> </Window>
</> </>
......
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