Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor. Fixed c8b9b2c6 which was incorrect (#787)

This commit is contained in:
omar
2018-04-30 19:40:25 +02:00
parent a1da7f9860
commit 7df985bc5c
2 changed files with 4 additions and 3 deletions

View File

@ -11013,8 +11013,8 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
selected = false;
// Hovering selectable with mouse updates NavId accordingly so navigation can be resumed with gamepad/keyboard (this doesn't happen on most widgets)
if (pressed || hovered)// && (g.IO.MouseDelta.x != 0.0f || g.IO.MouseDelta.y != 0.0f))
if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerActiveMask)
if (pressed || hovered)
if (!g.NavDisableMouseHover && g.NavWindow == window && g.NavLayer == window->DC.NavLayerCurrent)
{
g.NavDisableHighlight = true;
SetNavID(id, window->DC.NavLayerCurrent);