Tables: renamed ImGuiTableFlags_NoClipX to ImGuiTableFlags_NoClip, clarified purpose, moved lower in the list as it doesn't need to be so prominent.

This commit is contained in:
ocornut
2020-09-23 16:42:44 +02:00
parent 8ec05fc034
commit 36b2f3b4f1
3 changed files with 19 additions and 18 deletions

View File

@ -3828,7 +3828,7 @@ static void ShowDemoWindowTables()
flags &= ~(ImGuiTableFlags_SizingPolicyMaskX_ ^ ImGuiTableFlags_SizingPolicyFixedX); // Can't specify both sizing polices so we clear the other
ImGui::SameLine(); HelpMarker("Default if _ScrollX if enabled. Makes columns use _WidthFixed by default, or _WidthAlwaysAutoResize if _Resizable is not set.");
ImGui::CheckboxFlags("ImGuiTableFlags_Resizable", (unsigned int*)&flags, ImGuiTableFlags_Resizable);
ImGui::CheckboxFlags("ImGuiTableFlags_NoClipX", (unsigned int*)&flags, ImGuiTableFlags_NoClipX);
ImGui::CheckboxFlags("ImGuiTableFlags_NoClip", (unsigned int*)&flags, ImGuiTableFlags_NoClip);
if (ImGui::BeginTable("##3ways", 3, flags, ImVec2(0, 100)))
{
@ -4296,7 +4296,6 @@ static void ShowDemoWindowTables()
ImGui::BulletText("Padding, Sizing:");
ImGui::Indent();
ImGui::CheckboxFlags("ImGuiTableFlags_NoClipX", (unsigned int*)&flags, ImGuiTableFlags_NoClipX);
if (ImGui::CheckboxFlags("ImGuiTableFlags_SizingPolicyStretchX", (unsigned int*)&flags, ImGuiTableFlags_SizingPolicyStretchX))
flags &= ~(ImGuiTableFlags_SizingPolicyMaskX_ ^ ImGuiTableFlags_SizingPolicyStretchX); // Can't specify both sizing polices so we clear the other
ImGui::SameLine(); HelpMarker("[Default if ScrollX is off]\nFit all columns within available width (or specified inner_width). Fixed and Stretch columns allowed.");
@ -4307,6 +4306,8 @@ static void ShowDemoWindowTables()
ImGui::CheckboxFlags("ImGuiTableFlags_NoHostExtendY", (unsigned int*)&flags, ImGuiTableFlags_NoHostExtendY);
ImGui::CheckboxFlags("ImGuiTableFlags_NoKeepColumnsVisible", (unsigned int*)&flags, ImGuiTableFlags_NoKeepColumnsVisible);
ImGui::SameLine(); HelpMarker("Only available if ScrollX is disabled.");
ImGui::CheckboxFlags("ImGuiTableFlags_NoClip", (unsigned int*)&flags, ImGuiTableFlags_NoClip);
ImGui::SameLine(); HelpMarker("Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with ScrollFreeze options.");
ImGui::Unindent();
ImGui::BulletText("Scrolling:");
@ -4424,7 +4425,7 @@ static void ShowDemoWindowTables()
for (int row_n = clipper.DisplayStart; row_n < clipper.DisplayEnd; row_n++)
#else
{
for (int row_n = 0; row_n < items_count; n++)
for (int row_n = 0; row_n < items_count; row_n++)
#endif
{
MyItem* item = &items[row_n];