mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Storage and frame refactor (#1418)
The purpose of this is to expose `frame.storage()` and `frame.storage_mut()` so users can save/load app state from the `App::update` function, without having to add another parameter to that function. Changes: * Added `Frame::storage()` and `Frame::storage_mut()` * `App::update` now takes a `&mut Frame` rather than just `&Frame` * `Frame` is no longer `Clone` or `Sync` (doesn't have to be since https://github.com/emilk/egui/pull/1366)
This commit is contained in:
@@ -24,7 +24,7 @@ All notable changes to the epaint crate will be documented in this file.
|
||||
|
||||
|
||||
## 0.16.0 - 2021-12-29
|
||||
* Anti-alias path ends ([#893](https://github.com/emilk/egui/pull/893)).
|
||||
* Anti-alias path ends ([#893](https://github.com/emilk/egui/pull/893)).
|
||||
* `Rgba` now implements `Hash` ([#886](https://github.com/emilk/egui/pull/886)).
|
||||
* Renamed `Texture` to `FontImage`.
|
||||
|
||||
|
||||
@@ -34,8 +34,7 @@ impl ImageData {
|
||||
|
||||
pub fn bytes_per_pixel(&self) -> usize {
|
||||
match self {
|
||||
Self::Color(_) => 4,
|
||||
Self::Font(_) => 4,
|
||||
Self::Color(_) | Self::Font(_) => 4,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user