Skip to content

Commit 2310acd

Browse files
Merge pull request #363 from stripe2933/master
Capture mouse when using ViewManipulate()
2 parents 5963494 + 94cc742 commit 2310acd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ImGuizmo.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3137,6 +3137,13 @@ namespace IMGUIZMO_NAMESPACE
31373137
}
31383138

31393139
gContext.mbUsingViewManipulate = (interpolationFrames != 0) || isDraging;
3140+
if (isClicking || gContext.mbUsingViewManipulate || gContext.mIsViewManipulatorHovered) {
3141+
#if IMGUI_VERSION_NUM >= 18723
3142+
ImGui::SetNextFrameWantCaptureMouse(true);
3143+
#else
3144+
ImGui::CaptureMouseFromApp();
3145+
#endif
3146+
}
31403147

31413148
// restore view/projection because it was used to compute ray
31423149
ComputeContext(svgView.m16, svgProjection.m16, gContext.mModelSource.m16, gContext.mMode);

0 commit comments

Comments
 (0)