mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Merge branch 'master' into docking
# Conflicts: # examples/example_sdl_opengl2/main.cpp # examples/example_sdl_opengl3/main.cpp # examples/example_sdl_vulkan/main.cpp # examples/imgui_impl_sdl.cpp # examples/imgui_impl_sdl.h # imgui.cpp
This commit is contained in:
@ -2425,6 +2425,13 @@ static void ShowDemoWindowColumns()
|
||||
|
||||
ImGui::PushID("Columns");
|
||||
|
||||
static bool disable_indent = false;
|
||||
ImGui::Checkbox("Disable tree indentation", &disable_indent);
|
||||
ImGui::SameLine();
|
||||
HelpMarker("Disable the indenting of tree nodes so demo columns can use the full window width.");
|
||||
if (disable_indent)
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, 0.0f);
|
||||
|
||||
// Basic columns
|
||||
if (ImGui::TreeNode("Basic"))
|
||||
{
|
||||
@ -2530,7 +2537,10 @@ static void ShowDemoWindowColumns()
|
||||
if (h_borders && ImGui::GetColumnIndex() == 0)
|
||||
ImGui::Separator();
|
||||
ImGui::Text("%c%c%c", 'a'+i, 'a'+i, 'a'+i);
|
||||
ImGui::Text("Width %.2f\nOffset %.2f", ImGui::GetColumnWidth(), ImGui::GetColumnOffset());
|
||||
ImGui::Text("Width %.2f", ImGui::GetColumnWidth());
|
||||
ImGui::Text("Offset %.2f", ImGui::GetColumnOffset());
|
||||
ImGui::Text("Long text that is likely to clip");
|
||||
ImGui::Button("Button", ImVec2(-1.0f, 0.0f));
|
||||
ImGui::NextColumn();
|
||||
}
|
||||
ImGui::Columns(1);
|
||||
@ -2598,6 +2608,9 @@ static void ShowDemoWindowColumns()
|
||||
ImGui::Separator();
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (disable_indent)
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user