MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / TreeNodeDrawLineToTreePop

Method TreeNodeDrawLineToTreePop

3rdparty/imgui/src/imgui_widgets.cpp:7184–7208  ·  view source on GitHub ↗

Draw vertical line of the hierarchy

Source from the content-addressed store, hash-verified

7182
7183// Draw vertical line of the hierarchy
7184void ImGui::TreeNodeDrawLineToTreePop(const ImGuiTreeNodeStackData* data)
7185{
7186 ImGuiContext& g = *GImGui;
7187 ImGuiWindow* window = g.CurrentWindow;
7188 float y1 = ImMax(data->NavRect.Max.y, window->ClipRect.Min.y);
7189 float y2 = data->DrawLinesToNodesY2;
7190 if (data->TreeFlags & ImGuiTreeNodeFlags_DrawLinesFull)
7191 {
7192 float y2_full = window->DC.CursorPos.y;
7193 if (g.CurrentTable)
7194 y2_full = ImMax(g.CurrentTable->RowPosY2, y2_full);
7195 y2_full = ImTrunc(y2_full - g.Style.ItemSpacing.y - g.FontSize * 0.5f);
7196 if (y2 + (g.Style.ItemSpacing.y + g.Style.TreeLinesRounding) < y2_full) // FIXME: threshold to use ToNodes Y2 instead of Full Y2 when close by ItemSpacing.y
7197 y2 = y2_full;
7198 }
7199 y2 = ImMin(y2, window->ClipRect.Max.y);
7200 if (y2 <= y1)
7201 return;
7202 float x = ImTrunc(data->DrawLinesX1);
7203 if (data->DrawLinesTableColumn != -1)
7204 TablePushColumnChannel(data->DrawLinesTableColumn);
7205 window->DrawList->AddLineV(x, y1, y2, GetColorU32(ImGuiCol_TreeLines), g.Style.TreeLinesSize);
7206 if (data->DrawLinesTableColumn != -1)
7207 TablePopColumnChannel();
7208}
7209
7210void ImGui::TreePush(const char* str_id)
7211{

Callers

nothing calls this directly

Calls 4

ImMaxFunction · 0.85
ImTruncFunction · 0.85
ImMinFunction · 0.85
AddLineVMethod · 0.80

Tested by

no test coverage detected