returnImFloor(ImClamp(p,r.Min,r.Max));// ImFloor() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.
returnImFloor(ImClamp(pos,visible_rect.Min,visible_rect.Max));// ImFloor() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.
// When we have manually scrolled and NavId is out of bounds, we clamp its bounding box (used for search) to the visible area to restart navigation within visible items
window_rect_rel.Expand(ImVec2(-ImMin(window_rect_rel.GetWidth(),pad),-ImMin(window_rect_rel.GetHeight(),pad)));// Terrible approximation for the intend of starting navigation from first fully visible item
// For scoring we use a single segment on the left side our current item bounding box (not touching the edge to avoid box overlap with zero-spaced items)
ImGuiIDNavActivateId,NavInputId;// ~~ IsKeyPressedMap(ImGuiKey_NavActive) ? NavId : 0, etc. (to make widget code terser)
ImGuiIDNavTabbedId;//
ImRectNavRefRectRel,NavScoringRectScreen;// Reference rectangle, in window space. Modified rectangle for directional navigation scoring, in screen space.
ImRectNavScoringRectScreen;// Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
ImGuiWindow*NavWindowingTarget;
floatNavWindowingDisplayAlpha;
boolNavWindowingToggleLayer;
@ -571,7 +571,7 @@ struct ImGuiContext
NavWindow=NULL;
NavId=NavActivateId=NavInputId=NavTabbedId=0;
NavRefRectRel =NavScoringRectScreen =ImRect();
NavScoringRectScreen =ImRect();
NavWindowingTarget=NULL;
NavWindowingDisplayAlpha=0.0f;
NavWindowingToggleLayer=false;
@ -775,7 +775,8 @@ struct IMGUI_API ImGuiWindow
ImVec2SetWindowPosVal;// store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
ImVec2SetWindowPosPivot;// store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
ImGuiIDNavLastIds[2];// Last known NavId for this window, per layer (0/1)
ImGuiIDNavLastIds[2];// Last known NavId for this window, per layer (0/1)
ImRectNavRefRectRel[2];// Reference rectangle, in window space
ImGuiDrawContextDC;// Temporary per-window data, reset at the beginning of the frame
ImVector<ImGuiID>IDStack;// ID stack. ID are hashes seeded with the value at the top of the stack