Draw a stylized tree title bar.
423 {
425
426 constexpr ImGuiTreeNodeFlags treeNodeFlags =
427 ImGuiTreeNodeFlags_DefaultOpen |
428 ImGuiTreeNodeFlags_AllowItemOverlap |
429 ImGuiTreeNodeFlags_Framed |
430 ImGuiTreeNodeFlags_Bullet |
431 ImGuiTreeNodeFlags_FramePadding ;
432
433 ImGui::PushStyleColor(ImGuiCol_Header , ImVec4(0.196f, 0.204f, 0.2f, 1.0f));
434 ImGui::PushStyleColor(ImGuiCol_HeaderHovered , ImVec4(0.164f, 0.18f, 0.184f, 1.0f));
435 ImGui::PushStyleColor(ImGuiCol_HeaderActive , ImVec4(0.164f, 0.18f, 0.184f, 1.0f));
436 ImGui::PushStyleColor(ImGuiCol_WindowBg , ImVec4(0.196f, 0.204f, 0.2f, 1.0f));
437
438 const bool open = ImGui::TreeNodeEx(treeName.c_str(), treeNodeFlags, treeName.c_str());
439
440 if (progressFunc)
441 {
442 ImGui::SameLine(ImGui::GetContentRegionAvail().x * 0.3f);
443 progressFunc();
444 }
445
446 if (open)
447 {
448 if (treeFunc)
449 {
450 treeFunc();
451 }
452 ImGui::TreePop();
453 }
454
455 ImGui::PopStyleColor(4);
456 }
#define SPICES_PROFILE_ZONE