|
|
|
@ -4209,6 +4209,8 @@ static void ShowDemoWindowTables() |
|
|
|
|
|
|
|
|
|
const ImDrawList* parent_draw_list = ImGui::GetWindowDrawList(); |
|
|
|
|
const int parent_draw_list_draw_cmd_count = parent_draw_list->CmdBuffer.Size; |
|
|
|
|
ImVec2 table_scroll_cur, table_scroll_max; // For debug display
|
|
|
|
|
const ImDrawList* table_draw_list = NULL; // "
|
|
|
|
|
|
|
|
|
|
const float inner_width_to_use = (flags & ImGuiTableFlags_ScrollX) ? inner_width_with_scroll : inner_width_without_scroll; |
|
|
|
|
if (ImGui::BeginTable("##table", 5, flags, outer_size_enabled ? outer_size_value : ImVec2(0, 0), inner_width_to_use)) |
|
|
|
@ -4322,23 +4324,22 @@ static void ShowDemoWindowTables() |
|
|
|
|
} |
|
|
|
|
ImGui::PopButtonRepeat(); |
|
|
|
|
|
|
|
|
|
const ImVec2 table_scroll_cur = ImVec2(ImGui::GetScrollX(), ImGui::GetScrollY()); |
|
|
|
|
const ImVec2 table_scroll_max = ImVec2(ImGui::GetScrollMaxX(), ImGui::GetScrollMaxY()); |
|
|
|
|
const ImDrawList* table_draw_list = ImGui::GetWindowDrawList(); |
|
|
|
|
table_scroll_cur = ImVec2(ImGui::GetScrollX(), ImGui::GetScrollY()); |
|
|
|
|
table_scroll_max = ImVec2(ImGui::GetScrollMaxX(), ImGui::GetScrollMaxY()); |
|
|
|
|
table_draw_list = ImGui::GetWindowDrawList(); |
|
|
|
|
ImGui::EndTable(); |
|
|
|
|
|
|
|
|
|
static bool show_debug_details = false; |
|
|
|
|
ImGui::Checkbox("Debug details", &show_debug_details); |
|
|
|
|
if (show_debug_details) |
|
|
|
|
{ |
|
|
|
|
ImGui::SameLine(0.0f, 0.0f); |
|
|
|
|
const int table_draw_list_draw_cmd_count = table_draw_list->CmdBuffer.Size; |
|
|
|
|
if (table_draw_list == parent_draw_list) |
|
|
|
|
ImGui::Text(": DrawCmd: +%d (in same window)", table_draw_list_draw_cmd_count - parent_draw_list_draw_cmd_count); |
|
|
|
|
else |
|
|
|
|
ImGui::Text(": DrawCmd: +%d (in child window), Scroll: (%.f/%.f) (%.f/%.f)", |
|
|
|
|
table_draw_list_draw_cmd_count - 1, table_scroll_cur.x, table_scroll_max.x, table_scroll_cur.y, table_scroll_max.y); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
static bool show_debug_details = false; |
|
|
|
|
ImGui::Checkbox("Debug details", &show_debug_details); |
|
|
|
|
if (show_debug_details && table_draw_list) |
|
|
|
|
{ |
|
|
|
|
ImGui::SameLine(0.0f, 0.0f); |
|
|
|
|
const int table_draw_list_draw_cmd_count = table_draw_list->CmdBuffer.Size; |
|
|
|
|
if (table_draw_list == parent_draw_list) |
|
|
|
|
ImGui::Text(": DrawCmd: +%d (in same window)", table_draw_list_draw_cmd_count - parent_draw_list_draw_cmd_count); |
|
|
|
|
else |
|
|
|
|
ImGui::Text(": DrawCmd: +%d (in child window), Scroll: (%.f/%.f) (%.f/%.f)", |
|
|
|
|
table_draw_list_draw_cmd_count - 1, table_scroll_cur.x, table_scroll_max.x, table_scroll_cur.y, table_scroll_max.y); |
|
|
|
|
} |
|
|
|
|
ImGui::TreePop(); |
|
|
|
|
} |
|
|
|
@ -5076,9 +5077,9 @@ void ImGui::ShowStyleEditor(ImGuiStyle* ref) |
|
|
|
|
ImGui::Text("Main"); |
|
|
|
|
ImGui::SliderFloat2("WindowPadding", (float*)&style.WindowPadding, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("FramePadding", (float*)&style.FramePadding, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("CellPadding", (float*)&style.CellPadding, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("ItemSpacing", (float*)&style.ItemSpacing, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("ItemInnerSpacing", (float*)&style.ItemInnerSpacing, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("CellPadding", (float*)&style.CellPadding, 0.0f, 20.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat2("TouchExtraPadding", (float*)&style.TouchExtraPadding, 0.0f, 10.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat("IndentSpacing", &style.IndentSpacing, 0.0f, 30.0f, "%.0f"); |
|
|
|
|
ImGui::SliderFloat("ScrollbarSize", &style.ScrollbarSize, 1.0f, 20.0f, "%.0f"); |
|
|
|
|