mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-14 17:13:46 +00:00
Nav: Fixed clipped scoring when exiting a NavFlattened child back to a parent item (clipping not desirable then). (followup and fix to c665c15
). (#787)
This commit is contained in:
parent
6d98c0323b
commit
512ffa37bd
1 changed files with 2 additions and 2 deletions
|
@ -2341,9 +2341,9 @@ static bool NavScoreItem(ImGuiNavMoveResult* result, ImRect cand)
|
|||
const ImRect& curr = g.NavScoringRectScreen; // Current modified source rect (NB: we've applied Max.x = Min.x in NavUpdate() to inhibit the effect of having varied item width)
|
||||
g.NavScoringCount++;
|
||||
|
||||
if (window != g.NavWindow)
|
||||
// When entering through a NavFlattened border, we consider child window items as fully clipped for scoring
|
||||
if (window->ParentWindow == g.NavWindow)
|
||||
{
|
||||
// When crossing through a NavFlattened border, we score items on the other windows fully clipped
|
||||
IM_ASSERT((window->Flags | g.NavWindow->Flags) & ImGuiWindowFlags_NavFlattened);
|
||||
if (!window->ClipRect.Contains(cand))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue