Skip to content

Commit 8ab0133

Browse files
committed
Update examples.
1 parent 8cc098a commit 8ab0133

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

third_party/imgui_memory_editor/imgui_memory_editor.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,21 @@
88
//
99
// Usage:
1010
// // Create a window and draw memory editor inside it:
11-
// static MemoryEditor mem_edit_1;
12-
// static char data[0x10000];
13-
// size_t data_size = 0x10000;
14-
// mem_edit_1.DrawWindow("Memory Editor", data, data_size);
11+
// static bool show = true;
12+
// static size_t goto_addr = 0;
13+
// static MemoryEditor mem_edit_1(show, 0, goto_addr);
14+
// mem_edit_1.ReadFn = [](size_t off) -> ImU8 { return my_data[off]; };
15+
// mem_edit_1.WriteFn = [](size_t off, ImU8 d) { my_data[off] = d; };
16+
// mem_edit_1.DrawWindow("Memory Editor", data_size);
1517
//
1618
// Usage:
1719
// // If you already have a window, use DrawContents() instead:
18-
// static MemoryEditor mem_edit_2;
20+
// static bool show = true;
21+
// static size_t goto_addr = 0;
22+
// static MemoryEditor mem_edit_2(show, 0, goto_addr);
23+
// mem_edit_2.ReadFn = [](size_t off) -> ImU8 { return ((uint8_t*)ptr)[off]; };
1924
// ImGui::Begin("MyWindow")
20-
// mem_edit_2.DrawContents(this, sizeof(*this), (size_t)this);
25+
// mem_edit_2.DrawContents(mem_size);
2126
// ImGui::End();
2227
//
2328
// Changelog:

0 commit comments

Comments
 (0)