Tables: Handle columns clipped due to host rect

Return false in user functions, set SkipItems in window, redirect to dummy draw channel.
This commit is contained in:
omar
2019-12-28 19:17:59 +01:00
committed by ocornut
parent eee82e0451
commit 883c236eda
4 changed files with 78 additions and 43 deletions

View File

@ -3619,7 +3619,9 @@ static void ShowDemoWindowTables()
ImGui::TableNextRow();
for (int column = 0; column < 7; column++)
{
ImGui::TableSetColumnIndex(column);
// Both TableNextCell() and TableSetColumnIndex() return false when a column is not visible, which can be used for clipping.
if (!ImGui::TableSetColumnIndex(column))
continue;
if (column == 0)
ImGui::Text("Line %d", row);
else