Tables: Internal: Maintain InnerRect to further clarify some code. Renamed Bg1 fields to Bg2 (used by Selectable) as the other handles Bg0+Bg1.

This commit is contained in:
ocornut
2020-12-18 12:18:34 +01:00
parent ad83976b35
commit 30468829c2
4 changed files with 42 additions and 32 deletions

View File

@ -4687,11 +4687,11 @@ static void ShowDemoWindowTables()
| ImGuiTableFlags_ColumnsWidthFixed;
enum ContentsType { CT_Text, CT_Button, CT_SmallButton, CT_FillButton, CT_Selectable, CT_SelectableSpanRow };
static int contents_type = CT_Button;
static int contents_type = CT_SelectableSpanRow;
const char* contents_type_names[] = { "Text", "Button", "SmallButton", "FillButton", "Selectable", "Selectable (span row)" };
static int freeze_cols = 1;
static int freeze_rows = 1;
static int items_count = IM_ARRAYSIZE(template_items_names);
static int items_count = IM_ARRAYSIZE(template_items_names) * 2;
static ImVec2 outer_size_value = ImVec2(0, TEXT_BASE_HEIGHT * 12);
static float row_min_height = 0.0f; // Auto
static float inner_width_with_scroll = 0.0f; // Auto-extend