diff --git a/Multi-Select.md b/Multi-Select.md index a0dcd53..8902c8a 100644 --- a/Multi-Select.md +++ b/Multi-Select.md @@ -52,8 +52,8 @@ Minimum pseudo-code example using this helper: ```cpp static vector items; // Your items static ImGuiSelectionBasicStorage selection; // Your selection -selection.AdapterData = (void*)&items; // Setup adapter so selection.ApplyRequests() function can convert indexes to identifiers. -selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((vector*)self->AdapterData))[idx].ID; }; +selection.UserData = (void*)&items; // Setup adapter so selection.ApplyRequests() function can convert indexes to identifiers. +selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return ((vector*)self->UserData))[idx].ID; }; ImGuiMultiSelectIO* ms_io = ImGui::BeginMultiSelect(ImGuiMultiSelectFlags_None, selection.Size, items.Size); selection.ApplyRequests(ms_io);