egui/epaint
Emil Ernerfeldt 8e4fd942a9
Refactor memory data (#836)
This refactors the widget state storage introduced by @optozorax in https://github.com/emilk/egui/pull/257

* Unify the four buckets (`data`, `data_temp`, `id_data` and `id_data_temp`) into a single `data`.
  * Less complexity, and also less chance of error (storing in one bucket, reading from another).
* Store data by `Id` and `TypeId`.
  * Users can thus reuse the same `Id` to store many types.
  * Uses a simple xor of id and typeid, which is fast and good since both id and typeid are already high-entropy hashes.
* Use different suffixes on the functions to pick if you want the data persisted or not (`get_temp`, `insert_persisted`, etc).
  * Writing with one suffix and reading with the other works.
* To store state not bound to a specific `Id` (i.e. only based on type), use the new `Id::null` as the key.
2021-10-27 08:51:34 +02:00
..
fonts Replace ProggyClean.ttf with Hack-Regular.ttf as default monospace font (#802) 2021-10-17 20:49:28 +02:00
src Refactor memory data (#836) 2021-10-27 08:51:34 +02:00
Cargo.toml Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow 2021-10-24 16:15:07 +02:00
CHANGELOG.md Release 0.15.0 - Syntax highlighting, hscroll, egui-winit and egui_glow 2021-10-24 16:15:07 +02:00
README.md Rename Egui to egui 2021-01-17 14:48:59 +01:00

epaint - egui paint library

A bare-bones 2D graphics library for turning simple 2D shapes and text into textured triangles.

Made for egui.