diff --git a/imgui.cpp b/imgui.cpp index 16110ed65..93acf44d2 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -331,6 +331,7 @@ ImGuiIO::ImGuiIO() MouseDoubleClickMaxDist = 6.0f; // User functions + UserData = NULL; RenderDrawListsFn = NULL; MemAllocFn = malloc; MemReallocFn = realloc; diff --git a/imgui.h b/imgui.h index 576a8693c..65358aa06 100644 --- a/imgui.h +++ b/imgui.h @@ -427,6 +427,9 @@ struct ImGuiIO // 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);