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

MultiSelect: (Breaking) merge ImGuiSelectionRequestType_Clear and ImGuiSelectionRequestType_SelectAll into ImGuiSelectionRequestType_SetAll., rename ImGuiSelectionRequest::RangeSelected to Selected.

The reasoning is that it makes it easier/faster to write an adhoc ImGuiMultiSelectIO handler (e.g. trying to apply multi-select to checkboxes)
This commit is contained in:
ocornut 2024-03-06 14:22:38 +01:00
parent b13a78e6b2
commit f36a03c317
3 changed files with 23 additions and 31 deletions

View file

@ -1754,8 +1754,7 @@ struct IMGUI_API ImGuiMultiSelectTempData
ImVec2 BackupCursorMaxPos;
ImGuiID BoxSelectId;
ImGuiKeyChord KeyMods;
bool LoopRequestClear;
bool LoopRequestSelectAll;
ImS8 LoopRequestSetAll; // -1: no operation, 0: clear all, 1: select all.
bool IsEndIO; // Set when switching IO from BeginMultiSelect() to EndMultiSelect() state.
bool IsFocused; // Set if currently focusing the selection scope (any item of the selection). May be used if you have custom shortcut associated to selection.
bool IsSetRange; // Set by BeginMultiSelect() when using Shift+Navigation. Because scrolling may be affected we can't afford a frame of lag with Shift+Navigation.