Layout: Fixed mixing up SameLine() and SetCursorPos() together. SameLine() is a stateful.

+ minor unrelatedcomments.
This commit is contained in:
ocornut
2022-04-22 17:15:09 +02:00
parent eda7792b15
commit 5b29d14783
6 changed files with 23 additions and 8 deletions

View File

@ -1979,6 +1979,7 @@ struct IMGUI_API ImGuiWindowTempData
ImVec2 PrevLineSize;
float CurrLineTextBaseOffset; // Baseline offset (0.0f by default on a new line, generally == style.FramePadding.y when a framed item has been added).
float PrevLineTextBaseOffset;
bool IsSameLine;
ImVec1 Indent; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
ImVec1 ColumnsOffset; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ImVec1 GroupOffset;