remove context from ui (again) and create weird trait for it
This commit is contained in:
@@ -15,7 +15,7 @@ impl Widget for Image {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn image<Ctx>(image: impl LoadableImage) -> impl WidgetFn<Image, Ctx> {
|
||||
pub fn image(image: impl LoadableImage) -> impl WidgetFn<Image> {
|
||||
let image = image.get_image().expect("Failed to load image");
|
||||
move |ui| Image {
|
||||
handle: ui.add_texture(image),
|
||||
|
||||
Reference in New Issue
Block a user