From 485cd7b87ef078d41e4cd48991a41547673a2adc Mon Sep 17 00:00:00 2001 From: omar Date: Wed, 11 Dec 2024 00:36:06 +0100 Subject: [PATCH] Fixes --- Multi-Select.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);