1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

MultiSelect: Further simplication of user code to support Deletion.

Provide standard RequestFocusItem storage.
This commit is contained in:
ocornut 2023-06-02 15:29:55 +02:00
parent df1eeb9a20
commit c0035705ca
3 changed files with 48 additions and 38 deletions

View file

@ -1730,7 +1730,7 @@ struct IMGUI_API ImGuiMultiSelectTempData
//ImRect Rect; // Extent of selection scope between BeginMultiSelect() / EndMultiSelect(), used by ImGuiMultiSelectFlags_ClearOnClickRectVoid.
ImGuiMultiSelectTempData() { Clear(); }
void Clear() { memset(this, 0, sizeof(*this)); BeginIO.RangeSrcItem = EndIO.RangeSrcItem = BeginIO.RangeDstItem = EndIO.RangeDstItem = BeginIO.NavIdItem = EndIO.NavIdItem = (void*)-1; }
void Clear() { memset(this, 0, sizeof(*this)); BeginIO.Clear(); EndIO.Clear(); }
};
// Persistent storage for multi-select (as long as selection is alive)