1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-12-01 02:37:24 +01:00

Nav: Fixed popup wrap-around logic for windows with scrolling. (#787)

This commit is contained in:
omar 2018-01-15 21:55:32 +01:00
parent 05885b2e6d
commit 2f15cc0855

View File

@ -4790,7 +4790,7 @@ static void NavProcessMoveRequestWrapAround(ImGuiWindow* window)
{
g.NavMoveRequestForwardStep = 1;
NavMoveRequestCancel();
g.NavWindow->NavRectRel[0].Min.y = g.NavWindow->NavRectRel[0].Max.y = (g.NavMoveDir == ImGuiDir_Up) ? window->SizeFull.y : 0.0f;
g.NavWindow->NavRectRel[0].Min.y = g.NavWindow->NavRectRel[0].Max.y = ((g.NavMoveDir == ImGuiDir_Up) ? ImMax(window->SizeFull.y, window->SizeContents.y) : 0.0f) - window->Scroll.y;
}
}