File tree Expand file tree Collapse file tree
third_party/imgui_memory_editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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:
You can’t perform that action at this time.
0 commit comments