MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / renderConfigClassTree

Method renderConfigClassTree

apps/tools/Studio/StudioApp.cpp:2684–2715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2682 ImGui::PopStyleColor();
2683 }
2684}
2685
2686void StudioApp::renderConfigClassTree(const ParamClass& cls, int forceOpen)
2687{
2688 for (int i = 0; i < cls.GetEntryCount(); i++)
2689 {
2690 const ParamEntry& e = cls.GetEntry(i);
2691 ImGui::PushID(i);
2692 if (e.IsClass())
2693 {
2694 const ParamClass* sub = e.GetClassInterface();
2695 std::string label = e.GetName().Data();
2696 const char* base = sub ? sub->GetBaseName() : nullptr;
2697 if (base)
2698 {
2699 label += " : ";
2700 label += base;
2701 }
2702 if (forceOpen != 0)
2703 ImGui::SetNextItemOpen(forceOpen > 0, ImGuiCond_Always);
2704 if (ImGui::TreeNode(label.c_str()))
2705 {
2706 if (sub)
2707 renderConfigClassTree(*sub, forceOpen);
2708 ImGui::TreePop();
2709 }
2710 }
2711 else
2712 {
2713 RenderEntryValue(e);
2714 }
2715 ImGui::PopID();
2716 }
2717}
2718

Callers

nothing calls this directly

Calls 6

RenderEntryValueFunction · 0.85
GetClassInterfaceMethod · 0.80
GetEntryCountMethod · 0.45
IsClassMethod · 0.45
DataMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected