imgui_memory_editor.go 448 B

1234567891011121314151617181920
  1. package imgui
  2. // #include "imgui_memory_editor_wrapper.h"
  3. import "C"
  4. import "unsafe"
  5. type MemoryEditor uintptr
  6. func NewMemoryEditor() MemoryEditor {
  7. handle := C.IggNewMemoryEditor()
  8. return MemoryEditor(handle)
  9. }
  10. func (me MemoryEditor) handle() C.IggMemoryEditor {
  11. return C.IggMemoryEditor(me)
  12. }
  13. func (me MemoryEditor) DrawContents(data []uint8) {
  14. C.IggMemoryEditorDrawContents(me.handle(), unsafe.Pointer(&data[0]), C.size_t(len(data)))
  15. }