// FIXME-NAV: Consider policy for double scoring (scoring from NavScoringRectScreen + scoring from a rect wrapped according to current wrapping policy)
// FIXME-NAV: Consider policy for double scoring (scoring from NavScoringRectScreen + scoring from a rect wrapped according to current wrapping policy)
// *Fallback* manual-scroll with Nav directional keys when window has no navigable item
// *Fallback* manual-scroll with Nav directional keys when window has no navigable item
ImGuiWindow*window=g.NavWindow;
ImGuiWindow*window=g.NavWindow;
constfloatscroll_speed=IM_ROUND(window->CalcFontSize()*100*io.DeltaTime);// We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
constfloatscroll_speed=IM_ROUND(window->CalcFontSize()*100*io.DeltaTime);// We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
ImGuiDirNavMoveDir,NavMoveDirLast;// Direction of the move request (left/right/up/down), direction of the previous move request
ImGuiDirNavMoveDir,NavMoveDirLast;// Direction of the move request (left/right/up/down), direction of the previous move request
ImGuiDirNavMoveClipDir;// FIXME-NAV: Describe the purpose of this better. Might want to rename?
ImGuiDirNavMoveClipDir;// FIXME-NAV: Describe the purpose of this better. Might want to rename?
ImGuiNavMoveResultNavMoveResultLocal;// Best move request candidate within NavWindow
ImGuiNavItemData NavMoveResultLocal;// Best move request candidate within NavWindow
ImGuiNavMoveResultNavMoveResultLocalVisibleSet;// Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
ImGuiNavItemData NavMoveResultLocalVisibleSet;// Best move request candidate within NavWindow that are mostly visible (when using ImGuiNavMoveFlags_AlsoScoreVisibleSet flag)
ImGuiNavMoveResultNavMoveResultOther;// Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
ImGuiNavItemData NavMoveResultOther;// Best move request candidate within NavWindow's flattened hierarchy (when using ImGuiWindowFlags_NavFlattened flag)
ImGuiWindow*NavWrapRequestWindow;// Window which requested trying nav wrap-around.
ImGuiWindow*NavWrapRequestWindow;// Window which requested trying nav wrap-around.
IMGUI_APIvoidActivateItem(ImGuiIDid);// Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.
IMGUI_APIvoidActivateItem(ImGuiIDid);// Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.
draw_window->DC.NavLayerActiveMaskNext |=(1<<draw_window->DC.NavLayerCurrent);// This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
draw_window->DC.NavLayersActiveMaskNext |=(1<<draw_window->DC.NavLayerCurrent);// This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
draw_window->DC.CursorPos+=style.FramePadding;
draw_window->DC.CursorPos+=style.FramePadding;
inner_size.x-=draw_window->ScrollbarSizes.x;
inner_size.x-=draw_window->ScrollbarSizes.x;
}
}
@ -6589,7 +6589,7 @@ void ImGui::EndMenuBar()
// To do so we claim focus back, restore NavId and then process the movement request for yet another frame.
// To do so we claim focus back, restore NavId and then process the movement request for yet another frame.
// This involve a one-frame delay which isn't very problematic in this situation. We could remove it by scoring in advance for multiple window (probably not worth the hassle/cost)
// This involve a one-frame delay which isn't very problematic in this situation. We could remove it by scoring in advance for multiple window (probably not worth the hassle/cost)