Allow to disable help and test window functionality

This commit is contained in:
unknown 2015-03-20 12:08:00 -07:00
parent ff5378bd66
commit 2142181c51
3 changed files with 7 additions and 1 deletions

View File

@ -22,6 +22,9 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS
//---- Don't implement help and test window functionality (ShowUserGuide, ShowStyleEditor and ShowTestWindow methods won't be available)
//#define IMGUI_DISABLE_TEST_WINDOWS
//---- 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 so you can include code that extends ImGui using its private data/functions.
//#define IMGUI_INCLUDE_IMGUI_USER_INL //#define IMGUI_INCLUDE_IMGUI_USER_INL

View File

@ -8778,6 +8778,7 @@ static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y)
#endif #endif
#ifndef IMGUI_DISABLE_TEST_WINDOWS
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// HELP // HELP
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -10308,6 +10309,7 @@ static void ShowExampleAppLongText(bool* opened)
} }
// End of Sample code // End of Sample code
#endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// FONT DATA // FONT DATA

View File

@ -155,10 +155,11 @@ namespace ImGui
IMGUI_API void NewFrame(); IMGUI_API void NewFrame();
IMGUI_API void Render(); IMGUI_API void Render();
IMGUI_API void Shutdown(); IMGUI_API void Shutdown();
#ifndef IMGUI_DISABLE_TEST_WINDOWS
IMGUI_API void ShowUserGuide(); IMGUI_API void ShowUserGuide();
IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL); IMGUI_API void ShowStyleEditor(ImGuiStyle* ref = NULL);
IMGUI_API void ShowTestWindow(bool* open = NULL); IMGUI_API void ShowTestWindow(bool* open = NULL);
#endif
// Window // Window
// See implementation in .cpp for details // See implementation in .cpp for details
IMGUI_API bool Begin(const char* name = "Debug", bool* p_opened = NULL, const ImVec2& initial_size = ImVec2(0,0), float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // return false when window is collapsed, so you can early out in your code. passing 'bool* p_opened' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed. IMGUI_API bool Begin(const char* name = "Debug", bool* p_opened = NULL, const ImVec2& initial_size = ImVec2(0,0), float bg_alpha = -1.0f, ImGuiWindowFlags flags = 0); // return false when window is collapsed, so you can early out in your code. passing 'bool* p_opened' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.