I forgot why I did it the other way lol (revert)
This commit is contained in:
@@ -60,20 +60,22 @@ impl<'a, Ctx> Painter<'a, Ctx> {
|
||||
if self.sensors_map.get(&id.id).is_some() {
|
||||
self.active_sensors.push((region, id.id.duplicate()));
|
||||
}
|
||||
self.nodes.get_dyn(id).draw(Painter {
|
||||
nodes: self.nodes,
|
||||
ctx: self.ctx,
|
||||
sensors_map: self.sensors_map,
|
||||
active_sensors: self.active_sensors,
|
||||
primitives: self.primitives,
|
||||
region,
|
||||
});
|
||||
// &mut self is passed to avoid copying all of the "static" pointers in self
|
||||
// so need to save non static data here
|
||||
let old = self.region;
|
||||
self.region = region;
|
||||
self.nodes.get_dyn(id).draw(self);
|
||||
self.region = old;
|
||||
}
|
||||
|
||||
pub fn draw_texture(&mut self, handle: &TextureHandle) {
|
||||
self.write(handle.inner);
|
||||
}
|
||||
|
||||
pub fn region(&self) -> UiRegion {
|
||||
self.region
|
||||
}
|
||||
|
||||
pub fn ctx(&mut self) -> &mut Ctx {
|
||||
self.ctx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user