mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-01 06:38:28 +00:00
InputText, Nav: fixed remote/shortcut InputText() not teleporting mouse cursor when nav cursor is active and io.ConfigNavMoveSetMousePos is enabled.
Motivated by this, also made SetFocusID() immediately set g.NavIdIsAlive, which is more correct and might be other (positive) subtle side effects.
This commit is contained in:
@@ -13055,6 +13055,8 @@ void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window)
|
||||
window->NavLastIds[nav_layer] = id;
|
||||
if (g.LastItemData.ID == id)
|
||||
window->NavRectRel[nav_layer] = WindowRectAbsToRel(window, g.LastItemData.NavRect);
|
||||
if (g.NavId == g.ActiveId && g.ActiveIdIsAlive)
|
||||
g.NavIdIsAlive = true;
|
||||
|
||||
if (g.ActiveIdSource == ImGuiInputSource_Keyboard || g.ActiveIdSource == ImGuiInputSource_Gamepad)
|
||||
g.NavHighlightItemUnderNav = true;
|
||||
|
||||
Reference in New Issue
Block a user