diff --git a/imgui.cpp b/imgui.cpp index 16110ed..93acf44 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -331,6 +331,7 @@ MouseDoubleClickMaxDist = 6.0f; // User functions + UserData = NULL; RenderDrawListsFn = NULL; MemAllocFn = malloc; MemReallocFn = realloc; diff --git a/imgui.cpp b/imgui.cpp index 16110ed..93acf44 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -331,6 +331,7 @@ MouseDoubleClickMaxDist = 6.0f; // User functions + UserData = NULL; RenderDrawListsFn = NULL; MemAllocFn = malloc; MemReallocFn = realloc; diff --git a/imgui.h b/imgui.h index 576a869..65358aa 100644 --- a/imgui.h +++ b/imgui.h @@ -427,6 +427,9 @@ // User Functions //------------------------------------------------------------------ + // Store your own data for retrieval by callbacks. + void* UserData; // = NULL + // REQUIRED: rendering function. // See example code if you are unsure of how to implement this. void (*RenderDrawListsFn)(ImDrawList** const draw_lists, int count);