Call on the initial click.
| 7633 | |
| 7634 | // Call on the initial click. |
| 7635 | static void BoxSelectPreStartDrag(ImGuiID id, ImGuiSelectionUserData clicked_item) |
| 7636 | { |
| 7637 | ImGuiContext& g = *GImGui; |
| 7638 | ImGuiBoxSelectState* bs = &g.BoxSelectState; |
| 7639 | bs->ID = id; |
| 7640 | bs->IsStarting = true; // Consider starting box-select. |
| 7641 | bs->IsStartedFromVoid = (clicked_item == ImGuiSelectionUserData_Invalid); |
| 7642 | bs->IsStartedSetNavIdOnce = bs->IsStartedFromVoid; |
| 7643 | bs->KeyMods = g.IO.KeyMods; |
| 7644 | bs->StartPosRel = bs->EndPosRel = ImGui::WindowPosAbsToRel(g.CurrentWindow, g.IO.MousePos); |
| 7645 | bs->ScrollAccum = ImVec2(0.0f, 0.0f); |
| 7646 | } |
| 7647 | |
| 7648 | static void BoxSelectActivateDrag(ImGuiBoxSelectState* bs, ImGuiWindow* window) |
| 7649 | { |
no test coverage detected