Register widget can't auto register widget systems.
Closed this issue · 1 comments
StarArawn commented
Just need to figure out how to grok the types into playing nicely.
StarArawn commented
Just for documentation purposes you can now register widget systems through the widget trait:
impl Widget for WButton {
fn update() -> impl System<In = (), Out = bool> {
IntoSystem::into_system(update)
}
fn render() -> impl System<In = (), Out = ()> {
IntoSystem::into_system(render)
}
}
...
.register_widget::<WButton>()
You can also still use the existing add_widget_systems
if you desire. I think the boilerplate for the trait is a bit more heavy handed but its more cohesive.