Explorar o código

ShowTestWindow() demonstrate tree nodes within columns.

ocornut %!s(int64=10) %!d(string=hai) anos
pai
achega
4cb236fe46
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      imgui.cpp

+ 7 - 1
imgui.cpp

@@ -8343,7 +8343,13 @@ void ImGui::ShowTestWindow(bool* opened)
         ImGui::Columns(1);
 
         ImGui::Separator();
-        
+
+        ImGui::Columns(2, "tree items");
+        if (ImGui::TreeNode("Hello")) { ImGui::BulletText("World"); ImGui::TreePop(); } ImGui::NextColumn();
+        if (ImGui::TreeNode("Bonjour")) { ImGui::BulletText("Monde"); ImGui::TreePop(); }
+        ImGui::Columns(1);
+        ImGui::Separator();
+
         ImGui::Columns(2, "word wrapping");
         ImGui::TextWrapped("The quick brown fox jumps over the lazy dog.");
         ImGui::Text("Hello Left");