Dear ImGui Memory Editor Rust Bindings

Latest release on crates.io Documentation on docs.rs

Usage

This package is intended to be used with imgui-rs.

You can either use memory using a custom struct and closures or a slice.

Using 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) } ```

Using a Custom Struct

```rust let mut mem = Memory::new(); // Custom struct let mut timeswritten = 0; // Variable captured in closure let mut memoryeditor = MemoryEditor::::new() .drawwindow(imstr!("Name")) .readonly(false) .memsize(0x100) .readfn(|mem, offset| mem.read(offset)) .writefn(|mem, offset, value| { mem.write(offset); timeswritten += 1; // Variable used in closure println!("Written {} times", timeswritten); });

// In your main loop, draw the memory editor with draw() if memoryeditor.open() { memoryeditor.draw(&ui, &mut mem) } ```