From 48a944813cd24d65d11b8892418d4efaa983d903 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 5 Oct 2014 09:11:02 +0100 Subject: [PATCH] Moved UserData --- imgui.cpp | 2 +- imgui.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 93acf44d2..2e1a611a6 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -329,9 +329,9 @@ ImGuiIO::ImGuiIO() MousePosPrev = ImVec2(-1,-1); MouseDoubleClickTime = 0.30f; MouseDoubleClickMaxDist = 6.0f; + UserData = NULL; // User functions - UserData = NULL; RenderDrawListsFn = NULL; MemAllocFn = malloc; MemReallocFn = realloc; diff --git a/imgui.h b/imgui.h index 65358aa06..68eecfd1f 100644 --- a/imgui.h +++ b/imgui.h @@ -423,13 +423,12 @@ struct ImGuiIO ImWchar FontFallbackGlyph; // = '?' // Replacement glyph is one isn't found. float PixelCenterOffset; // = 0.0f // Try to set to 0.5f or 0.375f if rendering is blurry + void* UserData; // = NULL // Store your own data for retrieval by callbacks. + //------------------------------------------------------------------ // 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);