MultiSelect: added support for nested/stacked BeginMultiSelect().

Mimicking table logic, reusing amortized buffers.
This commit is contained in:
ocornut
2024-07-18 18:19:17 +02:00
parent b747d6fe59
commit 0af6fbb51d
4 changed files with 19 additions and 7 deletions
+3
View File
@@ -2811,6 +2811,9 @@ struct ImGuiSelectionRequest
ImGuiSelectionRequest(ImGuiSelectionRequestType type = ImGuiSelectionRequestType_None) { Type = type; RangeSelected = false; RangeFirstItem = RangeLastItem = (ImGuiSelectionUserData)-1; }
};
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
// Read the large comments block above for details.
// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect().
struct ImGuiMultiSelectIO
{
ImVector<ImGuiSelectionRequest> Requests; // ms:w, app:r / ms:w app:r // Requests