auto generate label (TODO: should be moved into widgets now that all have one)
This commit is contained in:
@@ -65,6 +65,8 @@ impl<Ctx> Ui<Ctx> {
|
||||
|
||||
pub fn push<W: Widget<Ctx>>(&mut self, w: W) -> WidgetId<W> {
|
||||
let id = self.id();
|
||||
self.labels
|
||||
.insert(id.id.duplicate(), std::any::type_name::<W>().to_string());
|
||||
self.widgets.insert(id.id.duplicate(), w);
|
||||
id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user