mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-12 15:59:54 +02:00
Tables: Made it possible to use SameLine(0,0) after TableNextColumn() or TableSetColumnIndex() in order to reuse line height from previous cell.
This commit is contained in:
@ -1779,7 +1779,7 @@ void ImGui::TableBeginRow(ImGuiTable* table)
|
||||
table->RowTextBaseline = 0.0f;
|
||||
table->RowIndentOffsetX = window->DC.Indent.x - table->HostIndentX; // Lock indent
|
||||
window->DC.PrevLineTextBaseOffset = 0.0f;
|
||||
window->DC.CurrLineSize = ImVec2(0.0f, 0.0f);
|
||||
window->DC.PrevLineSize = window->DC.CurrLineSize = ImVec2(0.0f, 0.0f); // This allows users to call SameLine() to share LineSize between columns, and to call it from first column too.
|
||||
window->DC.IsSameLine = window->DC.IsSetPos = false;
|
||||
window->DC.CursorMaxPos.y = next_y1;
|
||||
|
||||
@ -2016,6 +2016,7 @@ void ImGui::TableBeginCell(ImGuiTable* table, int column_n)
|
||||
window->DC.CursorPos.y = table->RowPosY1 + table->CellPaddingY;
|
||||
window->DC.CursorMaxPos.x = window->DC.CursorPos.x;
|
||||
window->DC.ColumnsOffset.x = start_x - window->Pos.x - window->DC.Indent.x; // FIXME-WORKRECT
|
||||
window->DC.CursorPosPrevLine = window->DC.CursorPos; // This allows users to call SameLine() to share LineSize between columns.
|
||||
window->DC.CurrLineTextBaseOffset = table->RowTextBaseline;
|
||||
window->DC.NavLayerCurrent = (ImGuiNavLayer)column->NavLayerCurrent;
|
||||
|
||||
|
Reference in New Issue
Block a user