made painter actually how I wanted it (draw now takes in an owned painter)

This commit is contained in:
2025-08-23 15:20:25 -04:00
parent 6fbdf9fbc8
commit 2ffb09bef0
10 changed files with 60 additions and 50 deletions

View File

@@ -93,16 +93,17 @@ impl<Ctx> Ui<Ctx> {
Ctx: 'static,
{
self.active_sensors.clear();
self.primitives.clear();
let mut painter = Painter::new(
&self.widgets,
&mut self.primitives,
ctx,
&mut self.sensor_map,
&self.sensor_map,
&mut self.active_sensors,
);
if let Some(base) = &self.base {
painter.draw_inner(base);
painter.draw(base);
}
self.primitives = painter.finish();
}
pub fn update(&mut self, ctx: &mut Ctx)