- The documentation is at the top of imgui.cpp + effectively imgui.h.
- The documentation is at the top of imgui.cpp + effectively imgui.h.
- Example code is in imgui_demo.cpp and particularly the ImGui::ShowTestWindow() function. It covers most features of ImGui so you can read the code and call the function itself to see its output.
- Example code is in imgui_demo.cpp and particularly the ImGui::ShowDemoWindow() function. It covers most features of ImGui so you can read the code and call the function itself to see its output.
- Standalone example applications using e.g. OpenGL/DirectX are provided in the examples/ folder.
- Standalone example applications using e.g. OpenGL/DirectX are provided in the examples/ folder.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",1000.0f/ImGui::GetIO().Framerate,ImGui::GetIO().Framerate);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",1000.0f/ImGui::GetIO().Framerate,ImGui::GetIO().Framerate);
}
}
@ -182,11 +182,11 @@ int main(int, char**)
ImGui::End();
ImGui::End();
}
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
// 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
if(show_test_window)
if(show_demo_window)
{
{
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",1000.0f/ImGui::GetIO().Framerate,ImGui::GetIO().Framerate);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)",1000.0f/ImGui::GetIO().Framerate,ImGui::GetIO().Framerate);
}
}
@ -185,11 +185,11 @@ int main(int, char**)
ImGui::End();
ImGui::End();
}
}
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
// 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
if(show_test_window)
if(show_demo_window)
{
{
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
// Read 'Programmer guide' in imgui.cpp for notes on how to setup ImGui in your codebase.
// Read 'Programmer guide' in imgui.cpp for notes on how to setup ImGui in your codebase.
// Get latest version at https://github.com/ocornut/imgui
// Get latest version at https://github.com/ocornut/imgui
@ -136,7 +136,7 @@ namespace ImGui
IMGUI_APIvoidShutdown();
IMGUI_APIvoidShutdown();
// Demo, Debug, Informations
// Demo, Debug, Informations
IMGUI_APIvoidShowTestWindow(bool*p_open=NULL);// create demo/test window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
staticinlinevoidSetNextWindowContentWidth(floatwidth){SetNextWindowContentSize(ImVec2(width,0.0f));}// OBSOLETE 1.53+ (nb: original version preserved last Y value set by SetNextWindowContentSize())
staticinlinevoidSetNextWindowContentWidth(floatwidth){SetNextWindowContentSize(ImVec2(width,0.0f));}// OBSOLETE 1.53+ (nb: original version preserved last Y value set by SetNextWindowContentSize())
// Message to the person tempted to delete this file when integrating ImGui into their code base:
// Message to the person tempted to delete this file when integrating ImGui into their code base:
// Don't do it! Do NOT remove this file from your project! It is useful reference code that you and other users will want to refer to.
// Don't do it! Do NOT remove this file from your project! It is useful reference code that you and other users will want to refer to.
// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowTestWindow().
// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowDemoWindow().
// During development, you can call ImGui::ShowTestWindow() in your code to learn about various features of ImGui. Have it wired in a debug menu!
// During development, you can call ImGui::ShowDemoWindow() in your code to learn about various features of ImGui. Have it wired in a debug menu!
// Removing this file from your project is hindering access to documentation for everyone in your team, likely leading you to poorer usage of the library.
// Removing this file from your project is hindering access to documentation for everyone in your team, likely leading you to poorer usage of the library.
// Note that you can #define IMGUI_DISABLE_TEST_WINDOWS in imconfig.h for the same effect.
// Note that you can #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h for the same effect.
// If you want to link core ImGui in your public builds but not those test windows, #define IMGUI_DISABLE_TEST_WINDOWS in imconfig.h and those functions will be empty.
// If you want to link core ImGui in your public builds but not those demo windows, #define IMGUI_DISABLE_DEMO_WINDOWS in imconfig.h and those functions will be empty.
// For any other case, if you have ImGui available you probably want this to be available for reference and execution.
// For any other case, if you have ImGui available you probably want this to be available for reference and execution.
// Thank you,
// Thank you,
// -Your beloved friend, imgui_demo.cpp (that you won't delete)
// -Your beloved friend, imgui_demo.cpp (that you won't delete)