1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-17 01:04:19 +00:00
This commit is contained in:
Timo Suoranta 2026-01-04 18:41:43 +01:00 committed by GitHub
commit 37e01baff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 2 deletions

View file

@ -7052,9 +7052,14 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
else
{
// Unframed typed for tree nodes
if (hovered || selected)
if (selected)
{
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
const ImU32 bg_col = GetColorU32(ImGuiCol_HeaderSelected);
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, false);
}
if (hovered)
{
const ImU32 bg_col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : ImGuiCol_HeaderHovered);
RenderFrame(frame_bb.Min, frame_bb.Max, bg_col, false);
}
RenderNavCursor(frame_bb, id, nav_render_cursor_flags);