auto generate label (TODO: should be moved into widgets now that all have one)

This commit is contained in:
2025-08-25 16:23:34 -04:00
parent 7b21b0714d
commit 325e13c01f

View File

@@ -65,6 +65,8 @@ impl<Ctx> Ui<Ctx> {
pub fn push<W: Widget<Ctx>>(&mut self, w: W) -> WidgetId<W> { pub fn push<W: Widget<Ctx>>(&mut self, w: W) -> WidgetId<W> {
let id = self.id(); let id = self.id();
self.labels
.insert(id.id.duplicate(), std::any::type_name::<W>().to_string());
self.widgets.insert(id.id.duplicate(), w); self.widgets.insert(id.id.duplicate(), w);
id id
} }