diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp
index 9d54976..ec83035 100644
--- a/examples/vulkan_example/main.cpp
+++ b/examples/vulkan_example/main.cpp
@@ -668,7 +668,7 @@
ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
}
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -700,7 +700,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -713,11 +713,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
g_ClearValue.color.float32[0] = clear_color.x;
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp
index 9d54976..ec83035 100644
--- a/examples/vulkan_example/main.cpp
+++ b/examples/vulkan_example/main.cpp
@@ -668,7 +668,7 @@
ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
}
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -700,7 +700,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -713,11 +713,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
g_ClearValue.color.float32[0] = clear_color.x;
diff --git a/imconfig.h b/imconfig.h
index 85eff5f..824a81a 100644
--- a/imconfig.h
+++ b/imconfig.h
@@ -23,9 +23,9 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
-//---- Don't implement test window functionality (ShowTestWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
-//---- It is very strongly recommended to NOT disable the test windows. Please read the comment at the top of imgui_demo.cpp to learn why.
-//#define IMGUI_DISABLE_TEST_WINDOWS
+//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
+//---- It is very strongly recommended to NOT disable the demo windows. Please read the comment at the top of imgui_demo.cpp to learn why.
+//#define IMGUI_DISABLE_DEMO_WINDOWS
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp
index 9d54976..ec83035 100644
--- a/examples/vulkan_example/main.cpp
+++ b/examples/vulkan_example/main.cpp
@@ -668,7 +668,7 @@
ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
}
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -700,7 +700,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -713,11 +713,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
g_ClearValue.color.float32[0] = clear_color.x;
diff --git a/imconfig.h b/imconfig.h
index 85eff5f..824a81a 100644
--- a/imconfig.h
+++ b/imconfig.h
@@ -23,9 +23,9 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
-//---- Don't implement test window functionality (ShowTestWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
-//---- It is very strongly recommended to NOT disable the test windows. Please read the comment at the top of imgui_demo.cpp to learn why.
-//#define IMGUI_DISABLE_TEST_WINDOWS
+//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
+//---- It is very strongly recommended to NOT disable the demo windows. Please read the comment at the top of imgui_demo.cpp to learn why.
+//#define IMGUI_DISABLE_DEMO_WINDOWS
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
diff --git a/imgui.cpp b/imgui.cpp
index 393b4e5..14b2bd8 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -1,7 +1,7 @@
// dear imgui, v1.53 WIP
// (main code and documentation)
-// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
+// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
// Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase.
// Get latest version at https://github.com/ocornut/imgui
// Releases change-log at https://github.com/ocornut/imgui/releases
@@ -86,7 +86,7 @@
- Read the FAQ below this section!
- Your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention
on your side, no state duplication, less sync, less bugs.
- - Call and read ImGui::ShowTestWindow() for demo code demonstrating most features.
+ - Call and read ImGui::ShowDemoWindow() for demo code demonstrating most features.
- You can learn about immediate-mode gui principles at http://www.johno.se/book/imgui.html or watch http://mollyrocket.com/861
HOW TO UPDATE TO A NEWER VERSION OF DEAR IMGUI
@@ -213,6 +213,7 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
+ - 2017/12/24 (1.53) - renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete).
- 2017/12/21 (1.53) - ImDrawList: renamed style.AntiAliasedShapes to style.AntiAliasedFill for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags
- 2017/12/21 (1.53) - ImDrawList: removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
- 2017/12/14 (1.53) - using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set.
@@ -576,7 +577,7 @@
- tip: the ImGuiOnceUponAFrame helper will allow run the block of code only once a frame. You can use it to quickly add custom UI in the middle
of a deep nested inner loop in your code.
- tip: you can call Render() multiple times (e.g for VR renders).
- - tip: call and read the ShowTestWindow() code in imgui_demo.cpp for more example of how to use ImGui!
+ - tip: call and read the ShowDemoWindow() code in imgui_demo.cpp for more example of how to use ImGui!
*/
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp
index 9d54976..ec83035 100644
--- a/examples/vulkan_example/main.cpp
+++ b/examples/vulkan_example/main.cpp
@@ -668,7 +668,7 @@
ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
}
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -700,7 +700,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -713,11 +713,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
g_ClearValue.color.float32[0] = clear_color.x;
diff --git a/imconfig.h b/imconfig.h
index 85eff5f..824a81a 100644
--- a/imconfig.h
+++ b/imconfig.h
@@ -23,9 +23,9 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
-//---- Don't implement test window functionality (ShowTestWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
-//---- It is very strongly recommended to NOT disable the test windows. Please read the comment at the top of imgui_demo.cpp to learn why.
-//#define IMGUI_DISABLE_TEST_WINDOWS
+//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
+//---- It is very strongly recommended to NOT disable the demo windows. Please read the comment at the top of imgui_demo.cpp to learn why.
+//#define IMGUI_DISABLE_DEMO_WINDOWS
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
diff --git a/imgui.cpp b/imgui.cpp
index 393b4e5..14b2bd8 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -1,7 +1,7 @@
// dear imgui, v1.53 WIP
// (main code and documentation)
-// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
+// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
// Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase.
// Get latest version at https://github.com/ocornut/imgui
// Releases change-log at https://github.com/ocornut/imgui/releases
@@ -86,7 +86,7 @@
- Read the FAQ below this section!
- Your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention
on your side, no state duplication, less sync, less bugs.
- - Call and read ImGui::ShowTestWindow() for demo code demonstrating most features.
+ - Call and read ImGui::ShowDemoWindow() for demo code demonstrating most features.
- You can learn about immediate-mode gui principles at http://www.johno.se/book/imgui.html or watch http://mollyrocket.com/861
HOW TO UPDATE TO A NEWER VERSION OF DEAR IMGUI
@@ -213,6 +213,7 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
+ - 2017/12/24 (1.53) - renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete).
- 2017/12/21 (1.53) - ImDrawList: renamed style.AntiAliasedShapes to style.AntiAliasedFill for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags
- 2017/12/21 (1.53) - ImDrawList: removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
- 2017/12/14 (1.53) - using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set.
@@ -576,7 +577,7 @@
- tip: the ImGuiOnceUponAFrame helper will allow run the block of code only once a frame. You can use it to quickly add custom UI in the middle
of a deep nested inner loop in your code.
- tip: you can call Render() multiple times (e.g for VR renders).
- - tip: call and read the ShowTestWindow() code in imgui_demo.cpp for more example of how to use ImGui!
+ - tip: call and read the ShowDemoWindow() code in imgui_demo.cpp for more example of how to use ImGui!
*/
diff --git a/imgui.h b/imgui.h
index 33580dc..10d46ab 100644
--- a/imgui.h
+++ b/imgui.h
@@ -2,7 +2,7 @@
// (headers)
// See imgui.cpp file for documentation.
-// 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.
// Get latest version at https://github.com/ocornut/imgui
@@ -136,7 +136,7 @@
IMGUI_API void Shutdown();
// Demo, Debug, Informations
- IMGUI_API void ShowTestWindow(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_API void ShowDemoWindow(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_API void ShowMetricsWindow(bool* p_open = NULL); // create metrics window. display ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc.
IMGUI_API void ShowStyleEditor(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_API bool ShowStyleSelector(const char* label);
@@ -985,6 +985,7 @@
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
namespace ImGui
{
+ static inline void ShowTestWindow() { return ShowDemoWindow(); } // OBSOLETE 1.53+
static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); } // OBSOLETE 1.53+
static inline bool IsRootWindowOrAnyChildFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); } // OBSOLETE 1.53+
static inline void SetNextWindowContentWidth(float width) { SetNextWindowContentSize(ImVec2(width, 0.0f)); } // OBSOLETE 1.53+ (nb: original version preserved last Y value set by SetNextWindowContentSize())
diff --git a/README.md b/README.md
index 29fcab1..6ababf5 100644
--- a/README.md
+++ b/README.md
@@ -140,7 +140,7 @@
Where is the documentation?
- 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.
- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
diff --git a/examples/allegro5_example/main.cpp b/examples/allegro5_example/main.cpp
index 4eb9a4a..f9abe75 100644
--- a/examples/allegro5_example/main.cpp
+++ b/examples/allegro5_example/main.cpp
@@ -41,7 +41,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -75,7 +75,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f/ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -88,11 +88,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/apple_example/imguiex-ios/debug_hud.cpp b/examples/apple_example/imguiex-ios/debug_hud.cpp
index fff26ee..c451322 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.cpp
+++ b/examples/apple_example/imguiex-ios/debug_hud.cpp
@@ -9,7 +9,7 @@
void DebugHUD_InitDefaults( DebugHUD *hud )
{
- hud->show_test_window = true;
+ hud->show_demo_window = true;
hud->show_example_window = true;
hud->rotation_speed = 15.0f;
@@ -26,10 +26,10 @@
void DebugHUD_DoInterface(DebugHUD *hud)
{
- if (hud->show_test_window)
+ if (hud->show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&hud->show_test_window );
+ ImGui::ShowDemoWindow(&hud->show_demo_window );
}
if (hud->show_example_window)
diff --git a/examples/apple_example/imguiex-ios/debug_hud.h b/examples/apple_example/imguiex-ios/debug_hud.h
index 17122f5..601376c 100644
--- a/examples/apple_example/imguiex-ios/debug_hud.h
+++ b/examples/apple_example/imguiex-ios/debug_hud.h
@@ -6,7 +6,7 @@
typedef struct DebugHUD
{
- bool show_test_window;
+ bool show_demo_window;
bool show_example_window;
float rotation_speed;
float cubeColor1[4];
diff --git a/examples/directx10_example/main.cpp b/examples/directx10_example/main.cpp
index 3ece69f..1d7da4b 100644
--- a/examples/directx10_example/main.cpp
+++ b/examples/directx10_example/main.cpp
@@ -141,7 +141,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -169,7 +169,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -182,11 +182,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx11_example/main.cpp b/examples/directx11_example/main.cpp
index 9bd8637..1c6f84a 100644
--- a/examples/directx11_example/main.cpp
+++ b/examples/directx11_example/main.cpp
@@ -144,7 +144,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -172,7 +172,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -185,11 +185,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ 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::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/directx9_example/main.cpp b/examples/directx9_example/main.cpp
index af53ddb..7ada228 100644
--- a/examples/directx9_example/main.cpp
+++ b/examples/directx9_example/main.cpp
@@ -93,7 +93,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -123,7 +123,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -136,11 +136,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/marmalade_example/main.cpp b/examples/marmalade_example/main.cpp
index f87b3bc..032e419 100644
--- a/examples/marmalade_example/main.cpp
+++ b/examples/marmalade_example/main.cpp
@@ -33,7 +33,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -58,7 +58,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -71,11 +71,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/null_example/main.cpp b/examples/null_example/main.cpp
index b12f75c..04c1bda 100644
--- a/examples/null_example/main.cpp
+++ b/examples/null_example/main.cpp
@@ -22,7 +22,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
- ImGui::ShowTestWindow(NULL);
+ ImGui::ShowDemoWindow(NULL);
ImGui::Render();
}
diff --git a/examples/opengl2_example/main.cpp b/examples/opengl2_example/main.cpp
index ed8f1a7..35c8d19 100644
--- a/examples/opengl2_example/main.cpp
+++ b/examples/opengl2_example/main.cpp
@@ -45,7 +45,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -66,7 +66,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -79,11 +79,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/opengl3_example/main.cpp b/examples/opengl3_example/main.cpp
index 062843d..d10d583 100644
--- a/examples/opengl3_example/main.cpp
+++ b/examples/opengl3_example/main.cpp
@@ -50,7 +50,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -71,7 +71,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -84,11 +84,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp
index 77241a5..cc7c5fb 100644
--- a/examples/sdl_opengl2_example/main.cpp
+++ b/examples/sdl_opengl2_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/sdl_opengl3_example/main.cpp b/examples/sdl_opengl3_example/main.cpp
index e51b320..a9e75fd 100644
--- a/examples/sdl_opengl3_example/main.cpp
+++ b/examples/sdl_opengl3_example/main.cpp
@@ -51,7 +51,7 @@
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != NULL);
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -79,7 +79,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -92,11 +92,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
// Rendering
diff --git a/examples/vulkan_example/main.cpp b/examples/vulkan_example/main.cpp
index 9d54976..ec83035 100644
--- a/examples/vulkan_example/main.cpp
+++ b/examples/vulkan_example/main.cpp
@@ -668,7 +668,7 @@
ImGui_ImplGlfwVulkan_InvalidateFontUploadObjects();
}
- bool show_test_window = true;
+ bool show_demo_window = true;
bool show_another_window = false;
ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
@@ -700,7 +700,7 @@
ImGui::Text("Hello, world!");
ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
ImGui::ColorEdit3("clear color", (float*)&clear_color);
- if (ImGui::Button("Test Window")) show_test_window ^= 1;
+ if (ImGui::Button("Demo Window")) show_demo_window ^= 1;
if (ImGui::Button("Another Window")) show_another_window ^= 1;
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
}
@@ -713,11 +713,11 @@
ImGui::End();
}
- // 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow().
- if (show_test_window)
+ // 3. Show the ImGui demo window. Most of the sample code is in ImGui::ShowDemoWindow().
+ if (show_demo_window)
{
ImGui::SetNextWindowPos(ImVec2(650, 20), ImGuiCond_FirstUseEver);
- ImGui::ShowTestWindow(&show_test_window);
+ ImGui::ShowDemoWindow(&show_demo_window);
}
g_ClearValue.color.float32[0] = clear_color.x;
diff --git a/imconfig.h b/imconfig.h
index 85eff5f..824a81a 100644
--- a/imconfig.h
+++ b/imconfig.h
@@ -23,9 +23,9 @@
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS
//#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS
-//---- Don't implement test window functionality (ShowTestWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
-//---- It is very strongly recommended to NOT disable the test windows. Please read the comment at the top of imgui_demo.cpp to learn why.
-//#define IMGUI_DISABLE_TEST_WINDOWS
+//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
+//---- It is very strongly recommended to NOT disable the demo windows. Please read the comment at the top of imgui_demo.cpp to learn why.
+//#define IMGUI_DISABLE_DEMO_WINDOWS
//---- Don't implement ImFormatString(), ImFormatStringV() so you can reimplement them yourself.
//#define IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS
diff --git a/imgui.cpp b/imgui.cpp
index 393b4e5..14b2bd8 100644
--- a/imgui.cpp
+++ b/imgui.cpp
@@ -1,7 +1,7 @@
// dear imgui, v1.53 WIP
// (main code and documentation)
-// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
+// Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
// Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase.
// Get latest version at https://github.com/ocornut/imgui
// Releases change-log at https://github.com/ocornut/imgui/releases
@@ -86,7 +86,7 @@
- Read the FAQ below this section!
- Your code creates the UI, if your code doesn't run the UI is gone! == very dynamic UI, no construction/destructions steps, less data retention
on your side, no state duplication, less sync, less bugs.
- - Call and read ImGui::ShowTestWindow() for demo code demonstrating most features.
+ - Call and read ImGui::ShowDemoWindow() for demo code demonstrating most features.
- You can learn about immediate-mode gui principles at http://www.johno.se/book/imgui.html or watch http://mollyrocket.com/861
HOW TO UPDATE TO A NEWER VERSION OF DEAR IMGUI
@@ -213,6 +213,7 @@
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
+ - 2017/12/24 (1.53) - renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete).
- 2017/12/21 (1.53) - ImDrawList: renamed style.AntiAliasedShapes to style.AntiAliasedFill for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags
- 2017/12/21 (1.53) - ImDrawList: removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
- 2017/12/14 (1.53) - using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set.
@@ -576,7 +577,7 @@
- tip: the ImGuiOnceUponAFrame helper will allow run the block of code only once a frame. You can use it to quickly add custom UI in the middle
of a deep nested inner loop in your code.
- tip: you can call Render() multiple times (e.g for VR renders).
- - tip: call and read the ShowTestWindow() code in imgui_demo.cpp for more example of how to use ImGui!
+ - tip: call and read the ShowDemoWindow() code in imgui_demo.cpp for more example of how to use ImGui!
*/
diff --git a/imgui.h b/imgui.h
index 33580dc..10d46ab 100644
--- a/imgui.h
+++ b/imgui.h
@@ -2,7 +2,7 @@
// (headers)
// See imgui.cpp file for documentation.
-// 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.
// Get latest version at https://github.com/ocornut/imgui
@@ -136,7 +136,7 @@
IMGUI_API void Shutdown();
// Demo, Debug, Informations
- IMGUI_API void ShowTestWindow(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_API void ShowDemoWindow(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_API void ShowMetricsWindow(bool* p_open = NULL); // create metrics window. display ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc.
IMGUI_API void ShowStyleEditor(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_API bool ShowStyleSelector(const char* label);
@@ -985,6 +985,7 @@
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
namespace ImGui
{
+ static inline void ShowTestWindow() { return ShowDemoWindow(); } // OBSOLETE 1.53+
static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); } // OBSOLETE 1.53+
static inline bool IsRootWindowOrAnyChildFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows); } // OBSOLETE 1.53+
static inline void SetNextWindowContentWidth(float width) { SetNextWindowContentSize(ImVec2(width, 0.0f)); } // OBSOLETE 1.53+ (nb: original version preserved last Y value set by SetNextWindowContentSize())
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
index 0b329ed..204a172 100644
--- a/imgui_demo.cpp
+++ b/imgui_demo.cpp
@@ -3,11 +3,11 @@
// 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.
-// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowTestWindow().
-// During development, you can call ImGui::ShowTestWindow() in your code to learn about various features of ImGui. Have it wired in a debug menu!
+// Everything in this file will be stripped out by the linker if you don't call ImGui::ShowDemoWindow().
+// 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.
-// Note that you can #define IMGUI_DISABLE_TEST_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.
+// 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 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.
// Thank you,
// -Your beloved friend, imgui_demo.cpp (that you won't delete)
@@ -70,7 +70,11 @@
// DEMO CODE
//-----------------------------------------------------------------------------
-#ifndef IMGUI_DISABLE_TEST_WINDOWS
+#if !defined(IMGUI_DISABLE_OBSOLETE_FUNCTIONS) && defined(IMGUI_DISABLE_TEST_WINDOWS) && !defined(IMGUI_DISABLE_DEMO_WINDOWS) // Obsolete name since 1.53, TEST->DEMO
+#define IMGUI_DISABLE_DEMO_WINDOWS
+#endif
+
+#if !defined(IMGUI_DISABLE_DEMO_WINDOWS)
static void ShowExampleAppConsole(bool* p_open);
static void ShowExampleAppLog(bool* p_open);
@@ -121,7 +125,7 @@
}
// Demonstrate most ImGui features (big function!)
-void ImGui::ShowTestWindow(bool* p_open)
+void ImGui::ShowDemoWindow(bool* p_open)
{
// Examples apps
static bool show_app_main_menu_bar = false;
@@ -231,7 +235,7 @@
ImGui::Spacing();
if (ImGui::CollapsingHeader("Help"))
{
- ImGui::TextWrapped("This window is being created by the ShowTestWindow() function. Please refer to the code in imgui_demo.cpp for reference.\n\n");
+ ImGui::TextWrapped("This window is being created by the ShowDemoWindow() function. Please refer to the code in imgui_demo.cpp for reference.\n\n");
ImGui::Text("USER GUIDE:");
ImGui::ShowUserGuide();
}
@@ -3041,7 +3045,7 @@
// End of Demo code
#else
-void ImGui::ShowTestWindow(bool*) {}
+void ImGui::ShowDemoWindow(bool*) {}
void ImGui::ShowUserGuide() {}
void ImGui::ShowStyleEditor(ImGuiStyle*) {}