// Still tied! we need to be extra-careful to make sure everything gets linked properly. We consistently break ties by symbolically moving "later" buttons
// Still tied! we need to be extra-careful to make sure everything gets linked properly. We consistently break ties by symbolically moving "later" buttons
// (with higher index) to the right/downwards by an infinitesimal amount since we the current "best" button already (so it must have a lower index),
// (with higher index) to the right/downwards by an infinitesimal amount since we the current "best" button already (so it must have a lower index),
// this is fairly easy. This rule ensures that all buttons with dx==dy==0 will end up being linked in order of appearance along the x axis.
// this is fairly easy. This rule ensures that all buttons with dx==dy==0 will end up being linked in order of appearance along the x axis.
if((g.NavMoveDir>=ImGuiNavDir_N?dby:dbx)<0.0f)// moving bj to the right/down decreases distance
if(((g.NavMoveDir==ImGuiNavDir_Up||g.NavMoveDir==ImGuiNavDir_Down)?dby:dbx)<0.0f)// moving bj to the right/down decreases distance
floatscroll_speed=ImFloor(g.FocusedWindow->CalcFontSize()*100*g.IO.DeltaTime+0.5f);// We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
floatscroll_speed=ImFloor(g.FocusedWindow->CalcFontSize()*100*g.IO.DeltaTime+0.5f);// We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
if(g.NavMoveRequest&&g.NavMoveDir==ImGuiNavDir_N)// When performing a navigation request, ensure we have one item extra in the direction we are moving to
if(g.NavMoveRequest&&g.NavMoveDir==ImGuiNavDir_Up)// When performing a navigation request, ensure we have one item extra in the direction we are moving to