39 const int focused_idx =
40 (int)ms_io->NavIdItem;
41 if (ms_io->NavIdSelected ==
false)
44 ms_io->RangeSrcReset =
54 for (
int idx = focused_idx + 1; idx < items_count; idx++)
55 if (!Contains(GetStorageIdFromIndex(idx)))
60 for (
int idx =
IM_MIN(focused_idx, items_count) - 1; idx >= 0; idx--)
61 if (!Contains(GetStorageIdFromIndex(idx)))
73 ImVector<ITEM_TYPE>& items,
74 int item_curr_idx_to_select) {
78 ImVector<ITEM_TYPE> new_items;
79 new_items.reserve(items.Size - Size);
80 int item_next_idx_to_select = -1;
81 for (
int idx = 0; idx < items.Size; idx++) {
82 if (!Contains(GetStorageIdFromIndex(idx)))
83 new_items.push_back(items[idx]);
84 if (item_curr_idx_to_select == idx)
85 item_next_idx_to_select = new_items.Size - 1;
87 items.swap(new_items);
91 if (item_next_idx_to_select != -1 && ms_io->NavIdSelected)
92 SetItemSelected(GetStorageIdFromIndex(item_next_idx_to_select),
true);