diff --git a/imgui.cpp b/imgui.cpp index 16110ed65..20983434c 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -332,6 +332,7 @@ ImGuiIO::ImGuiIO() // User functions RenderDrawListsFn = NULL; + UserData = NULL; MemAllocFn = malloc; MemReallocFn = realloc; MemFreeFn = free; diff --git a/imgui.h b/imgui.h index 576a8693c..4c923280b 100644 --- a/imgui.h +++ b/imgui.h @@ -430,6 +430,7 @@ struct ImGuiIO // REQUIRED: rendering function. // See example code if you are unsure of how to implement this. void (*RenderDrawListsFn)(ImDrawList** const draw_lists, int count); + void* UserData; // Optional: access OS clipboard (default to use native Win32 clipboard on Windows, otherwise use a ImGui private clipboard) // Override to access OS clipboard on other architectures.