mouse fix
This commit is contained in:
parent
4c8b890bcc
commit
27361937e9
2 changed files with 9 additions and 0 deletions
|
@ -359,6 +359,11 @@ void GameView::onWindowGUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_is_mouse_captured) {
|
||||||
|
os::setMouseScreenPos(m_captured_mouse_x, m_captured_mouse_y);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_is_mouse_captured && os::getFocused() != ImGui::GetWindowViewport()->PlatformHandle) captureMouse(false);
|
if (m_is_mouse_captured && os::getFocused() != ImGui::GetWindowViewport()->PlatformHandle) captureMouse(false);
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
|
|
|
@ -1494,6 +1494,10 @@ void SceneView::onWindowGUI()
|
||||||
m_view->m_draw_cmds.clear();
|
m_view->m_draw_cmds.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_is_mouse_captured) {
|
||||||
|
os::setMouseScreenPos(m_captured_mouse_x, m_captured_mouse_y);
|
||||||
|
}
|
||||||
|
|
||||||
if (m_is_mouse_captured && os::getFocused() != ImGui::GetWindowViewport()->PlatformHandle) {
|
if (m_is_mouse_captured && os::getFocused() != ImGui::GetWindowViewport()->PlatformHandle) {
|
||||||
captureMouse(false);
|
captureMouse(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue