Renamed the emblematic ShowTestWindow() function to ShowDemoWindow(). Kept redirection function (will obsolete).

This commit is contained in:
omar
2017-12-24 18:16:22 +01:00
parent cead207535
commit 1b86e7343f
18 changed files with 78 additions and 72 deletions

View File

@ -93,7 +93,7 @@ int main(int, char**)
//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 @@ int main(int, char**)
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 @@ int main(int, char**)
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