retained
Keep local variables between repeated function calls using simple macro.
This crate is no_std.
Usage
use retained;
Without retained, Checkbox's states would be reset on every draw call.
By using retained, local variable check_box is kept inside DrawState struct.
And draw function gets additional &mut DrawState argument.
Examples
See examples for simple example and egui demo ported using retained.
License
This crate is licensed under MIT OR Apache-2.0