From 25c9448dda4bd25fbe14a5c6cd5642a2429753ca Mon Sep 17 00:00:00 2001 From: ocornut Date: Thu, 24 Dec 2015 16:19:50 +0100 Subject: [PATCH] imconfig.h tweak, not advertising IMGUI_INCLUDE_IMGUI_USER_INL anymore. --- imconfig.h | 11 +++-------- imgui.cpp | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/imconfig.h b/imconfig.h index 20f58b2a..33cbadd1 100644 --- a/imconfig.h +++ b/imconfig.h @@ -13,9 +13,6 @@ //#define IMGUI_API __declspec( dllexport ) //#define IMGUI_API __declspec( dllimport ) -//---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions. -//#define IMGUI_INCLUDE_IMGUI_USER_INL - //---- Include imgui_user.h at the end of imgui.h //#define IMGUI_INCLUDE_IMGUI_USER_H @@ -43,14 +40,12 @@ operator MyVec4() const { return MyVec4(x,y,z,w); } */ -//---- Freely implement extra functions within the ImGui:: namespace. -//---- Declare helpers or widgets implemented in imgui_user.inl or elsewhere, so end-user doesn't need to include multiple files. -//---- e.g. you can create variants of the ImGui::Value() helper for your low-level math types, or your own widgets/helpers. +//---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files. +//---- e.g. create variants of the ImGui::Value() helper for your low-level math types, or your own widgets/helpers. /* namespace ImGui { - void Value(const char* prefix, const MyVec2& v, const char* float_format = NULL); - void Value(const char* prefix, const MyVec4& v, const char* float_format = NULL); + void Value(const char* prefix, const MyMatrix44& v, const char* float_format = NULL); } */ diff --git a/imgui.cpp b/imgui.cpp index b0eb7f21..1f0c40cf 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9310,8 +9310,8 @@ void ImGui::ShowMetricsWindow(bool* opened) //----------------------------------------------------------------------------- -//---- Include imgui_user.inl at the end of imgui.cpp -//---- So you can include code that extends ImGui using its private data/functions. +// Include imgui_user.inl at the end of imgui.cpp to access private data/functions that aren't exposed. +// Prefer just including imgui_internal.h from your code rather than using this define. If a declaration is missing from imgui_internal.h add it or request it on the github. #ifdef IMGUI_INCLUDE_IMGUI_USER_INL #include "imgui_user.inl" #endif