This commit is contained in:
2025-08-25 14:21:25 -04:00
parent 9e751d4161
commit 41103f2732
2 changed files with 3 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ impl Text {
impl<Ctx> Widget<Ctx> for Text {
fn draw(&self, painter: &mut Painter<Ctx>) {
// TODO: when on_update is added to painter,
// return & store TextureHandle to reuse
painter.draw_text(&self.content, &self.attrs);
}
}

View File

@@ -103,6 +103,7 @@ impl<Ctx> Ui<Ctx> {
{
self.active.clear();
self.primitives.clear();
// free before bc nothing should exist
self.free();
let mut painter = Painter::new(
&self.widgets,