I'm trying to pass a handle:
#[derive(Clone, PartialEq)]
pub struct MyUi;
impl ViewTemplate for MyUi {
type View = impl View;
fn create(&self, cx: &mut Cx) -> Self::View {
let font_assets = cx.use_resource::<MyFontAssets>();
let font = font_assets.comic_sans.clone();
Element::<NodeBundle>::new().style(move |ss: &mut StyleBuilder| {
ss.font(font);
})
}
}
But it doesn't work because the style builder function must be Fn:
expected a closure that implements the `Fn` trait, but this closure only implements `FnOnce`
required for `{closure@src/my_ui.rs:26:44: 26:72}` to implement `bevy_mod_stylebuilder::StyleTuple`
Is there a way to make font handles work with quill?
I'm trying to pass a handle:
But it doesn't work because the style builder function must be
Fn:Is there a way to make font handles work with quill?