Removed redirecting functions/enums names that were marked obsolete in 1.63 (August 2018) + tables tweaks.

This commit is contained in:
ocornut
2020-12-21 19:09:11 +01:00
parent 4d8e839ddf
commit 2e48c2da81
5 changed files with 38 additions and 34 deletions

View File

@ -3594,8 +3594,10 @@ static void ShowDemoWindowTables()
"Fixed-width columns generally makes more sense if you want to use horizontal scrolling.\n\n"
"Double-click a column border to auto-fit the column to its contents.");
static ImGuiTableFlags flags = ImGuiTableFlags_Resizable | ImGuiTableFlags_ColumnsWidthFixed | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_ContextMenuInBody;
//ImGui::CheckboxFlags("ImGuiTableFlags_ScrollX", &flags, ImGuiTableFlags_ScrollX); // FIXME-TABLE: Explain or fix the effect of enable Scroll on outer_size
if (ImGui::BeginTable("##table1", 3, flags))
static bool use_all_width = true;
ImGui::Checkbox("Use all width", &use_all_width);
if (ImGui::BeginTable("##table1", 3, flags, ImVec2(use_all_width ? -FLT_MIN : 0.0f, 0.0f)))
{
for (int row = 0; row < 5; row++)
{
@ -3663,7 +3665,7 @@ static void ShowDemoWindowTables()
if (ImGui::TreeNode("Reorderable, hideable, with headers"))
{
HelpMarker("Click and drag column headers to reorder columns.\n\nYou can also right-click on a header to open a context menu.");
static ImGuiTableFlags flags = ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV | ImGuiTableFlags_NoBordersInBody;
static ImGuiTableFlags flags = ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable | ImGuiTableFlags_BordersOuter | ImGuiTableFlags_BordersV;
PushStyleCompact();
ImGui::CheckboxFlags("ImGuiTableFlags_Resizable", &flags, ImGuiTableFlags_Resizable);
ImGui::CheckboxFlags("ImGuiTableFlags_Reorderable", &flags, ImGuiTableFlags_Reorderable);
@ -4026,7 +4028,7 @@ static void ShowDemoWindowTables()
{
HelpMarker("This demonstrate embedding a table into another table cell.");
if (ImGui::BeginTable("recurse1", 2, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable))
if (ImGui::BeginTable("recurse1", 2, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable))
{
ImGui::TableSetupColumn("A0");
ImGui::TableSetupColumn("A1");
@ -4036,7 +4038,7 @@ static void ShowDemoWindowTables()
ImGui::Text("A0 Cell 0");
{
float rows_height = TEXT_BASE_HEIGHT * 2;
if (ImGui::BeginTable("recurse2", 2, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable))
if (ImGui::BeginTable("recurse2", 2, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_Hideable))
{
ImGui::TableSetupColumn("B0");
ImGui::TableSetupColumn("B1");