// Scoring function for directional navigation. Based on https://gist.github.com/rygorous/6981057
// FIXME-NAVIGATION: Pretty rough.
// FIXME-NAVIGATION: May want to handle the degenerate case that we have commented out.
staticboolNavScoreItem(constImRect&cand)
staticboolNavScoreItem(ImRectcand)
{
ImGuiContext&g=*GImGui;
constImRect&curr=g.NavScoringRectScreen;// Current modified source rect (NB: we've applied Max.x = Min.x in NavUpdate() to inhibit the effect of having lots of items with varied width)
cand.Clip(g.CurrentWindow->ClipRect);
// Compute distance between boxes
// FIXME-NAVIGATION: Introducing various biases toward typical imgui uses cases, but we don't have any rigorous proof of their effect now.
ImFormatString(buf,IM_ARRAYSIZE(buf),"db (%.0f,%.0f->%.1f) dc (%.0f,%.0f->%.1f) da (%.0f,%.0f->%.1f) quad %c",dbx,dby,dist_box,dcx,dcy,dist_center,dax,day,dist_axial,"WENS"[quadrant]);
ImFormatString(buf,IM_ARRAYSIZE(buf),"db (%.0f,%.0f->%.5f) dc (%.0f,%.0f->%.5f) da (%.0f,%.0f->%.5f) quad %c",dbx,dby,dist_box,dcx,dcy,dist_center,dax,day,dist_axial,"WENS"[quadrant]);