Lines Matching refs:cand
7159 static bool NavScoreItem(ImGuiNavMoveResult* result, ImRect cand)
7173 if (!window->ClipRect.Contains(cand))
7175 cand.ClipWithFull(window->ClipRect); // This allows the scored item to not overlap other candidates in the parent window
7180 NavClampRectToVisibleAreaForMoveDir(g.NavMoveClipDir, cand, window->ClipRect);
7184 float dbx = NavScoreItemDistInterval(cand.Min.x, cand.Max.x, curr.Min.x, curr.Max.x);
7185 float dby = NavScoreItemDistInterval(ImLerp(cand.Min.y, cand.Max.y, 0.2f), ImLerp(cand.Min.y, cand.Max.y, 0.8f), ImLerp(curr.Min.y, curr.Max.y, 0.2f), ImLerp(curr.Min.y, curr.Max.y, 0.8f)); // Scale down on Y to keep using box-distance for vertically touching items
7191 float dcx = (cand.Min.x + cand.Max.x) - (curr.Min.x + curr.Max.x);
7192 float dcy = (cand.Min.y + cand.Max.y) - (curr.Min.y + curr.Max.y);
7195 // Determine which quadrant of 'curr' our candidate item 'cand' lies in based on distance
7222 if (ImGui::IsMouseHoveringRect(cand.Min, cand.Max))
7227 draw_list->AddRect(cand.Min, cand.Max, IM_COL32(255,255,0,200));
7228 draw_list->AddRectFilled(cand.Max-ImVec2(4,4), cand.Max+ImGui::CalcTextSize(buf)+ImVec2(4,4), IM_COL32(40,0,0,150));
7229 draw_list->AddText(g.IO.FontDefault, 13.0f, cand.Max, ~0U, buf);
7238 draw_list->AddRectFilled(cand.Min, cand.Max, IM_COL32(255, 0, 0, 200));
7239 draw_list->AddText(g.IO.FontDefault, 13.0f, cand.Min, IM_COL32(255, 255, 255, 255), buf);
7274 // Axial check: if 'curr' has no link at all in some direction and 'cand' lies roughly in that direction, add a tentative link. This will only be kept if no "real" matches