MultiSelect: Added ImGuiMultiSelectFlags_ClearOnClickWindowVoid. + Demo: showcase multiple selection scopes in same window.

This commit is contained in:
ocornut
2024-07-18 18:19:13 +02:00
parent b91ae122e1
commit 35bbadcf0c
4 changed files with 54 additions and 21 deletions
+1
View File
@@ -1720,6 +1720,7 @@ struct IMGUI_API ImGuiMultiSelectState
ImGuiMultiSelectData Out; // The Out requests are finalized and returned by EndMultiSelect()
bool InRangeDstPassedBy; // (Internal) set by the the item that match NavJustMovedToId when InRequestRangeSetNav is set.
bool InRequestSetRangeNav; // (Internal) set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford a frame of lag with Shift+Navigation.
//ImRect Rect; // Extent of selection scope between BeginMultiSelect() / EndMultiSelect(), used by ImGuiMultiSelectFlags_ClearOnClickRectVoid.
ImGuiMultiSelectState() { Clear(); }
void Clear() { FocusScopeId = 0; In.Clear(); Out.Clear(); InRangeDstPassedBy = InRequestSetRangeNav = false; }