mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Nav: Failed movement request with no current NavId fallback to an InitDefaultRequest so that we always land somewhere on first move (#323)
This commit is contained in:
parent
5ef8452509
commit
8a6d209f68
@ -2664,6 +2664,14 @@ static void NavUpdate()
|
||||
if (g.NavMoveDir != ImGuiNavDir_None)
|
||||
g.NavMoveRequest = true;
|
||||
|
||||
// If we initiate a movement request and have no current NavId, we initiate a InitDefautRequest that will be used as a fallback if the direction fails to find a match
|
||||
if (g.NavMoveRequest && g.NavId == 0)
|
||||
{
|
||||
g.NavInitDefaultRequest = g.NavInitDefaultResultExplicit = true;
|
||||
g.NavInitDefaultResultId = 0;
|
||||
g.NavDisableHighlight = false;
|
||||
}
|
||||
|
||||
// Scrolling
|
||||
if (g.NavWindow && !(g.NavWindow->Flags & ImGuiWindowFlags_NoNavInputs) && !g.NavWindowingTarget)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user