Add retained paints and shared text selection

This commit is contained in:
iris committed 2026-09-10 18:35:24 -04:00
1 parent 1e6d3b1edd
commit a33fbca966
42 files changed
+2424 -470

No files matched your search

+3 -3
View File
@@ -20,7 +20,7 @@ struct Test {
impl Test {
pub fn new(rsc: &mut Rsc) -> Self {
let root = rect(Color::RED).add(rsc);
let root = rect(PaintId::RED).add(rsc);
let cur = rsc.create_state(root, false);
Self { root, cur }
}
@@ -28,9 +28,9 @@ impl Test {
let cur = &mut rsc[self.cur];
*cur = !*cur;
if *cur {
rsc[self.root].color = Color::BLUE;
rsc[self.root].set_paint(PaintId::BLUE);
} else {
rsc[self.root].color = Color::RED;
rsc[self.root].set_paint(PaintId::RED);
}
}
}