1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 12:50:04 -04:00

Release 0.18.1 of egui & epaint - Change Shape::Callback to &mut dyn Any (#1552)

This commit is contained in:
Emil Ernerfeldt
2022-05-01 11:35:29 +02:00
committed by GitHub
parent dc26890a80
commit b30224471c
6 changed files with 15 additions and 7 deletions

View File

@@ -754,12 +754,12 @@ pub struct PaintCallback {
///
/// The rendering backend is also responsible for restoring any state,
/// such as the bound shader program and vertex array.
pub callback: Arc<dyn Fn(&PaintCallbackInfo, &dyn std::any::Any) + Send + Sync>,
pub callback: Arc<dyn Fn(&PaintCallbackInfo, &mut dyn std::any::Any) + Send + Sync>,
}
impl PaintCallback {
#[inline]
pub fn call(&self, info: &PaintCallbackInfo, render_ctx: &dyn std::any::Any) {
pub fn call(&self, info: &PaintCallbackInfo, render_ctx: &mut dyn std::any::Any) {
(self.callback)(info, render_ctx);
}
}