From 2e85dce1ee3361c0a71d9ec76e7fdb42751bf1ac Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 10 Sep 2014 11:22:01 +0100 Subject: [PATCH] Added #define IMGUI_INCLUDE_IMGUI_USER_CPP to optionally include imgui_user.cpp --- imconfig.h | 3 +++ imgui.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/imconfig.h b/imconfig.h index d1ed745b..ed5a1b80 100644 --- a/imconfig.h +++ b/imconfig.h @@ -20,6 +20,9 @@ //---- Don't implement default clipboard handlers for Windows (so as not to link with OpenClipboard(), etc.) //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS +//---- Include imgui_user.cpp at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions. +//#define IMGUI_INCLUDE_IMGUI_USER_CPP + //---- Define implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4. /* #define IM_VEC2_CLASS_EXTRA \ diff --git a/imgui.cpp b/imgui.cpp index 6905ac35..27cc46a6 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6237,3 +6237,10 @@ void GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const voi }; //----------------------------------------------------------------------------- + +//---- Include imgui_user.cpp at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions. +#ifdef IMGUI_INCLUDE_IMGUI_USER_CPP +#include "imgui_user.cpp" +#endif + +//-----------------------------------------------------------------------------