mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Nav: Disabled clipping g.NavId and fixed interactions with ImGuiListClipper. (#787)
This commit is contained in:
@ -2227,6 +2227,8 @@ void ImGui::CalcListClipping(int items_count, float items_height, int* out_items
|
||||
ImRect unclipped_rect = window->ClipRect;
|
||||
if (g.NavMoveRequest)
|
||||
unclipped_rect.Add(g.NavScoringRect);
|
||||
if (g.NavJustMovedToId && window->NavLastIds[0] == g.NavJustMovedToId)
|
||||
unclipped_rect.Add(ImRect(window->Pos + window->NavRectRel[0].Min, window->Pos + window->NavRectRel[0].Max));
|
||||
|
||||
const ImVec2 pos = window->DC.CursorPos;
|
||||
int start = (int)((unclipped_rect.Min.y - pos.y) / items_height);
|
||||
@ -3142,7 +3144,7 @@ bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = g.CurrentWindow;
|
||||
if (!bb.Overlaps(window->ClipRect))
|
||||
if (id == 0 || id != g.ActiveId)
|
||||
if (id == 0 || (id != g.ActiveId && id != g.NavId))
|
||||
if (clip_even_when_logged || !g.LogEnabled)
|
||||
return true;
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user