Limiting Columns()/BeginColumns() api to 64 columns (#125)

While the current code technically supports it, future code may not so we're putting the restriction ahead.
This commit is contained in:
omar
2019-12-17 13:25:46 +01:00
parent 10fdc03a46
commit 9d444062f9
4 changed files with 6 additions and 2 deletions

View File

@ -7411,8 +7411,8 @@ void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlag
ImGuiContext& g = *GImGui;
ImGuiWindow* window = GetCurrentWindow();
IM_ASSERT(columns_count >= 1);
IM_ASSERT(window->DC.CurrentColumns == NULL); // Nested columns are currently not supported
IM_ASSERT(columns_count >= 1 && columns_count <= 64); // Maximum 64 columns
IM_ASSERT(window->DC.CurrentColumns == NULL); // Nested columns are currently not supported
// Acquire storage for the columns set
ImGuiID id = GetColumnsID(str_id, columns_count);