diff --git a/imgui.cpp b/imgui.cpp index 428552eb5..1ed7d6c11 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -9369,10 +9369,15 @@ void ImGui::ShowTestWindow(bool* opened) ImGui::TextWrapped("(Use ImGui::SameLine() to keep adding items to the right of the preceeding item)"); // Text - ImGui::Text("Hello"); + ImGui::Text("Two items: Hello"); ImGui::SameLine(); ImGui::TextColored(ImVec4(1,1,0,1), "World"); + // Adjust spacing + ImGui::Text("More spacing: Hello"); + ImGui::SameLine(0, 20); + ImGui::TextColored(ImVec4(1,1,0,1), "World"); + // Button ImGui::AlignFirstTextHeightToWidgets(); ImGui::Text("Normal buttons"); ImGui::SameLine(); @@ -9385,6 +9390,14 @@ void ImGui::ShowTestWindow(bool* opened) ImGui::SmallButton("Like this one"); ImGui::SameLine(); ImGui::Text("can fit within a text block."); + // Aligned to arbitrary position. Easy/cheap column. + ImGui::Text("Aligned"); + ImGui::SameLine(150); ImGui::Text("x=150"); + ImGui::SameLine(300); ImGui::Text("x=300"); + ImGui::Text("Aligned"); + ImGui::SameLine(150); ImGui::SmallButton("x=150"); + ImGui::SameLine(300); ImGui::SmallButton("x=300"); + // Checkbox static bool c1=false,c2=false,c3=false,c4=false; ImGui::Checkbox("My", &c1); ImGui::SameLine();