Release 0.18.1 of egui & epaint - Change Shape::Callback
to &mut dyn Any
(#1552)
This commit is contained in:
parent
dc26890a80
commit
b30224471c
6 changed files with 15 additions and 7 deletions
|
@ -7,6 +7,10 @@ NOTE: [`epaint`](epaint/CHANGELOG.md), [`eframe`](eframe/CHANGELOG.md), [`egui-w
|
|||
## Unreleased
|
||||
|
||||
|
||||
## 0.18.1 - 2022-05-01
|
||||
* Change `Shape::Callback` from `&dyn Any` to `&mut dyn Any` to support more backends.
|
||||
|
||||
|
||||
## 0.18.0 - 2022-04-30
|
||||
|
||||
### Added ⭐
|
||||
|
|
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -1100,7 +1100,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "egui"
|
||||
version = "0.18.0"
|
||||
version = "0.18.1"
|
||||
dependencies = [
|
||||
"ahash 0.7.6",
|
||||
"epaint",
|
||||
|
@ -1286,7 +1286,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "epaint"
|
||||
version = "0.18.0"
|
||||
version = "0.18.1"
|
||||
dependencies = [
|
||||
"ab_glyph",
|
||||
"ahash 0.7.6",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "egui"
|
||||
version = "0.18.0"
|
||||
version = "0.18.1"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "An easy-to-use immediate mode GUI that runs on both web and native"
|
||||
edition = "2021"
|
||||
|
@ -48,7 +48,7 @@ serde = ["dep:serde", "epaint/serde"]
|
|||
|
||||
|
||||
[dependencies]
|
||||
epaint = { version = "0.18.0", path = "../epaint", default-features = false }
|
||||
epaint = { version = "0.18.1", path = "../epaint", default-features = false }
|
||||
|
||||
ahash = "0.7"
|
||||
nohash-hasher = "0.2"
|
||||
|
|
|
@ -5,6 +5,10 @@ All notable changes to the epaint crate will be documented in this file.
|
|||
## Unreleased
|
||||
|
||||
|
||||
## 0.18.1 - 2022-05-01
|
||||
* Change `Shape::Callback` from `&dyn Any` to `&mut dyn Any` to support more backends.
|
||||
|
||||
|
||||
## 0.18.0 - 2022-04-30
|
||||
* MSRV (Minimum Supported Rust Version) is now `1.60.0` ([#1467](https://github.com/emilk/egui/pull/1467)).
|
||||
* Add `Shape::Callback` for backend-specific painting ([#1351](https://github.com/emilk/egui/pull/1351)).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "epaint"
|
||||
version = "0.18.0"
|
||||
version = "0.18.1"
|
||||
authors = ["Emil Ernerfeldt <emil.ernerfeldt@gmail.com>"]
|
||||
description = "Minimal 2D graphics library for GUI work"
|
||||
edition = "2021"
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue