| 3372 | } |
| 3373 | |
| 3374 | static void* TableSettingsHandler_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*, const char* name) |
| 3375 | { |
| 3376 | ImGuiID id = 0; |
| 3377 | int columns_count = 0; |
| 3378 | if (sscanf(name, "0x%08X,%d", &id, &columns_count) < 2) |
| 3379 | return NULL; |
| 3380 | |
| 3381 | if (ImGuiTableSettings* settings = ImGui::TableSettingsFindByID(id)) |
| 3382 | { |
| 3383 | if (settings->ColumnsCountMax >= columns_count) |
| 3384 | { |
| 3385 | TableSettingsInit(settings, id, columns_count, settings->ColumnsCountMax); // Recycle |
| 3386 | return settings; |
| 3387 | } |
| 3388 | settings->ID = 0; // Invalidate storage, we won't fit because of a count change |
| 3389 | } |
| 3390 | return ImGui::TableSettingsCreate(id, columns_count); |
| 3391 | } |
| 3392 | |
| 3393 | static void TableSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entry, const char* line) |
| 3394 | { |
nothing calls this directly
no test coverage detected