@ -8416,13 +8416,15 @@ ImVec2 ImGui::GetMousePos()
return g . IO . MousePos ;
}
// This is called TeleportMousePos() and not SetMousePos() to emphasis that setting MousePosPrev will effectively clear mouse delta as well.
// It is expected you only call this if (io.BackendFlags & ImGuiBackendFlags_HasSetMousePos) is set and supported by backend.
void ImGui : : Se tMousePos( const ImVec2 & pos )
void ImGui : : Telepor tMousePos( const ImVec2 & pos )
{
ImGuiContext & g = * GImGui ;
g . IO . MousePos = g . IO . MousePosPrev = pos ;
g . IO . MouseDelta = ImVec2 ( 0.0f , 0.0f ) ;
g . IO . WantSetMousePos = true ;
//IMGUI_DEBUG_LOG_IO("Se tMousePos: (%.1f,%.1f)\n", io.MousePos.x, io.MousePos.y);
//IMGUI_DEBUG_LOG_IO("Telepor tMousePos: (%.1f,%.1f)\n", io.MousePos.x, io.MousePos.y);
}
// NB: prefer to call right after BeginPopup(). At the time Selectable/MenuItem is activated, the popup is already closed!
@ -11562,7 +11564,7 @@ static void ImGui::NavUpdate()
// Update mouse position if requested
// (This will take into account the possibility that a Scroll was queued in the window to offset our absolute mouse position before scroll has been applied)
if ( set_mouse_pos & & ( io . ConfigFlags & ImGuiConfigFlags_NavEnableSetMousePos ) & & ( io . BackendFlags & ImGuiBackendFlags_HasSetMousePos ) )
Se tMousePos( NavCalcPreferredRefPos ( ) ) ;
Telepor tMousePos( NavCalcPreferredRefPos ( ) ) ;
// [DEBUG]
g . NavScoringDebugCount = 0 ;