Began improvements to columns API by splitting the Columns() function into BeginColumns() and EndColumns() and adding additional flags. The columns data still needs to be placed into a stack.

This commit is contained in:
Geoffrey Tucker
2016-10-29 15:44:08 -07:00
parent 43e6c46c8d
commit 66c4281290
5 changed files with 199 additions and 89 deletions

View File

@ -282,7 +282,7 @@ struct ImGuiGroupData
// Per column data for Columns()
struct ImGuiColumnData
{
float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
float OffsetNorm; // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
//float IndentX;
};
@ -571,7 +571,7 @@ struct IMGUI_API ImGuiDrawContext
float ColumnsStartPosY;
float ColumnsCellMinY;
float ColumnsCellMaxY;
bool ColumnsShowBorders;
ImGuiColumnsFlags ColumnsFlags;
ImGuiID ColumnsSetId;
ImVector<ImGuiColumnData> ColumnsData;
@ -603,7 +603,7 @@ struct IMGUI_API ImGuiDrawContext
ColumnsMinX = ColumnsMaxX = 0.0f;
ColumnsStartPosY = 0.0f;
ColumnsCellMinY = ColumnsCellMaxY = 0.0f;
ColumnsShowBorders = true;
ColumnsFlags = 0;
ColumnsSetId = 0;
}
};