1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-09 23:54:20 +00:00

Tables: comments. (#7937)

This commit is contained in:
ocornut 2024-09-04 14:41:22 +02:00
parent 776813416b
commit 722a2a12fb
3 changed files with 12 additions and 6 deletions

View file

@ -6403,7 +6403,11 @@ static void ShowDemoWindowTables()
// FIXME: It would be nice to actually demonstrate full-featured selection using those checkbox.
static bool column_selected[3] = {};
// Instead of calling TableHeadersRow() we'll submit custom headers ourselves
// Instead of calling TableHeadersRow() we'll submit custom headers ourselves.
// (A different approach is also possible:
// - Specify ImGuiTableColumnFlags_NoHeaderLabel in some TableSetupColumn() call.
// - Call TableHeadersRow() normally. This will submit TableHeader() with no name.
// - Then call TableSetColumnIndex() to position yourself in the column and submit your stuff e.g. Checkbox().)
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
for (int column = 0; column < COLUMNS_COUNT; column++)
{
@ -6418,6 +6422,7 @@ static void ShowDemoWindowTables()
ImGui::PopID();
}
// Submit table contents
for (int row = 0; row < 5; row++)
{
ImGui::TableNextRow();