Check ImGui mousecapture and don't propagate event
This commit is contained in:
parent
3b11701eb2
commit
bf2cf898cc
1 changed files with 4 additions and 0 deletions
|
|
@ -1154,6 +1154,10 @@ void VulkanExampleBase::handleMessages(HWND hWnd, UINT uMsg, WPARAM wParam, LPAR
|
||||||
case WM_MOUSEMOVE:
|
case WM_MOUSEMOVE:
|
||||||
{
|
{
|
||||||
bool handled = false;
|
bool handled = false;
|
||||||
|
|
||||||
|
ImGuiIO& io = ImGui::GetIO();
|
||||||
|
handled = io.WantCaptureMouse;
|
||||||
|
|
||||||
int32_t posx = LOWORD(lParam);
|
int32_t posx = LOWORD(lParam);
|
||||||
int32_t posy = HIWORD(lParam);
|
int32_t posy = HIWORD(lParam);
|
||||||
mouseMoved((float)posx, (float)posy, handled);
|
mouseMoved((float)posx, (float)posy, handled);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue