mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-24 16:46:36 +00:00
Demo: Added an extra 3-way columns demo
This commit is contained in:
parent
0f36ec9cb9
commit
d6a5fd06d7
@ -1312,7 +1312,22 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||||||
// Basic columns
|
// Basic columns
|
||||||
if (ImGui::TreeNode("Basic"))
|
if (ImGui::TreeNode("Basic"))
|
||||||
{
|
{
|
||||||
ImGui::Columns(4, "mycolumns");
|
ImGui::Text("Without border:");
|
||||||
|
ImGui::Columns(3, "mycolumns3", false); // 3-ways, no border
|
||||||
|
ImGui::Separator();
|
||||||
|
for (int n = 0; n < 14; n++)
|
||||||
|
{
|
||||||
|
char label[32];
|
||||||
|
sprintf(label, "Item %d", n);
|
||||||
|
if (ImGui::Selectable(label)) {}
|
||||||
|
//if (ImGui::Button(label, ImVec2(-1,0))) {}
|
||||||
|
ImGui::NextColumn();
|
||||||
|
}
|
||||||
|
ImGui::Columns(1);
|
||||||
|
ImGui::Separator();
|
||||||
|
|
||||||
|
ImGui::Text("With border:");
|
||||||
|
ImGui::Columns(4, "mycolumns"); // 4-ways, with border
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text("ID"); ImGui::NextColumn();
|
ImGui::Text("ID"); ImGui::NextColumn();
|
||||||
ImGui::Text("Name"); ImGui::NextColumn();
|
ImGui::Text("Name"); ImGui::NextColumn();
|
||||||
|
Loading…
Reference in New Issue
Block a user