Commit 399d1583 authored by w4t's avatar w4t

Fixed first level tree node

parent 0243cdc6
Pipeline #59 canceled with stages
......@@ -145,7 +145,7 @@ bool ofxImGui::BeginTree(const std::string& name, Settings& settings)
ImGui::SetNextTreeNodeOpen(true, ImGuiSetCond_Appearing);
if (settings.treeLevel == 0)
{
result = ImGui::CollapsingHeader(GetUniqueName(name));
result = ImGui::TreeNodeEx(GetUniqueName(name), ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog);
}
else
{
......@@ -164,10 +164,7 @@ bool ofxImGui::BeginTree(const std::string& name, Settings& settings)
//--------------------------------------------------------------
void ofxImGui::EndTree(Settings& settings)
{
if (settings.treeLevel > 1)
{
ImGui::TreePop();
}
ImGui::TreePop();
settings.treeLevel = std::max(0, settings.treeLevel - 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment