MCPcopy Create free account
hub / github.com/cinder/Cinder / SetItemSelected

Method SetItemSelected

src/imgui/imgui_widgets.cpp:8426–8431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8424}
8425
8426void ImGuiSelectionBasicStorage::SetItemSelected(ImGuiID id, bool selected)
8427{
8428 int* p_int = _Storage.GetIntRef(id, 0);
8429 if (selected && *p_int == 0) { *p_int = _SelectionOrder++; Size++; }
8430 else if (!selected && *p_int != 0) { *p_int = 0; Size--; }
8431}
8432
8433// Optimized for batch edits (with same value of 'selected')
8434static void ImGuiSelectionBasicStorage_BatchSetItemSelected(ImGuiSelectionBasicStorage* selection, ImGuiID id, bool selected, int size_before_amends, int selection_order)

Calls 1

GetIntRefMethod · 0.80

Tested by

no test coverage detected