This package is intended to be used with imgui-rs.
You can either use memory using a custom struct and closures or a slice.
```rust let mut vec = vec![0xFF; 0x100]; // Can also use a &mut [u8] if you want to use the editor to modify the slice let mut memoryeditor = MemoryEditor::<&[u8]>::new() .drawwindow(imstr!("Memory")) // Can omit if you don't want to create a window .readonly(true);
// In your main loop, draw the memory editor with drawvec() if memoryeditor.open() { // open() can be omitted if drawwindow was not used memoryeditor.draw_vec(&ui, &mut vec) } ```
```rust
let mut mem = Memory::new(); // Custom struct
let mut timeswritten = 0; // Variable captured in closure
let mut memoryeditor = MemoryEditor::
// In your main loop, draw the memory editor with draw() if memoryeditor.open() { memoryeditor.draw(&ui, &mut mem) } ```