Columns: Fixed Separator from creating an extraneous draw command. Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. (#125)

This commit is contained in:
omar
2019-05-09 12:10:36 +02:00
parent 42fc563fed
commit b7c2759f95
4 changed files with 38 additions and 12 deletions

View File

@ -683,6 +683,7 @@ struct ImGuiColumns
float LineMinY, LineMaxY;
float BackupCursorPosY; // Backup of CursorPos at the time of BeginColumns()
float BackupCursorMaxPosX; // Backup of CursorMaxPos at the time of BeginColumns()
ImRect BackupClipRect;
ImVector<ImGuiColumnData> Columns;
ImGuiColumns() { Clear(); }
@ -1502,7 +1503,9 @@ namespace ImGui
// New Columns API (FIXME-WIP)
IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
IMGUI_API void EndColumns(); // close columns
IMGUI_API void PushColumnClipRect(int column_index = -1);
IMGUI_API void PushColumnClipRect(int column_index);
IMGUI_API void PushColumnsBackground();
IMGUI_API void PopColumnsBackground();
IMGUI_API ImGuiID GetColumnsID(const char* str_id, int count);
IMGUI_API ImGuiColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id);