Skip to content

Commit

Permalink
Return egui::TextureId on removal (mvlabat#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur authored and HackerFoo committed Jul 16, 2022
1 parent 7d7a1c7 commit 352b48e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ impl EguiContext {
}

/// Removes the image handle and an Egui texture id associated with it.
pub fn remove_image(&mut self, image: &Handle<Image>) -> Option<u64> {
pub fn remove_image(&mut self, image: &Handle<Image>) -> Option<egui::TextureId> {
let id = self.user_textures.remove(&image.id);
log::debug!("Remove image (id: {:?}, handle: {:?})", id, image);
id
id.map(egui::TextureId::User)
}

/// Returns associated Egui texture id.
Expand Down

0 comments on commit 352b48e

Please sign in to comment.