Demo: Removed one level of indentation in the ShowDemoWindowXXX functions (6 kb worth of spaces!). Will break some merge/PR.

docking
omar 6 years ago
parent eed1fba157
commit f3e642322f

@ -391,8 +391,9 @@ void ImGui::ShowDemoWindow(bool* p_open)
static void ShowDemoWindowWidgets()
{
if (ImGui::CollapsingHeader("Widgets"))
{
if (!ImGui::CollapsingHeader("Widgets"))
return;
if (ImGui::TreeNode("Basic"))
{
static int clicked = 0;
@ -1512,13 +1513,13 @@ static void ShowDemoWindowWidgets()
ImGui::TreePop();
}
}
}
static void ShowDemoWindowLayout()
{
if (ImGui::CollapsingHeader("Layout"))
{
if (!ImGui::CollapsingHeader("Layout"))
return;
if (ImGui::TreeNode("Child regions"))
{
static bool disable_mouse_wheel = false;
@ -1902,13 +1903,13 @@ static void ShowDemoWindowLayout()
ImGui::GetWindowDrawList()->AddText(ImGui::GetFont(), ImGui::GetFontSize()*2.0f, ImVec2(pos.x + offset.x, pos.y + offset.y), IM_COL32(255, 255, 255, 255), "Line 1 hello\nLine 2 clip me!", NULL, 0.0f, &clip_rect);
ImGui::TreePop();
}
}
}
static void ShowDemoWindowPopups()
{
if (ImGui::CollapsingHeader("Popups & Modal windows"))
{
if (!ImGui::CollapsingHeader("Popups & Modal windows"))
return;
// Popups are windows with a few special properties:
// - They block normal mouse hovering detection outside them. (*)
// - Unless modal, they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
@ -2109,13 +2110,13 @@ static void ShowDemoWindowPopups()
ImGui::Separator();
ImGui::TreePop();
}
}
}
static void ShowDemoWindowColumns()
{
if (ImGui::CollapsingHeader("Columns"))
{
if (!ImGui::CollapsingHeader("Columns"))
return;
ImGui::PushID("Columns");
// Basic columns
@ -2292,7 +2293,6 @@ static void ShowDemoWindowColumns()
ImGui::TreePop();
}
ImGui::PopID();
}
}
static void ShowDemoWindowMisc()

Loading…
Cancel
Save