From bfc25bc8a3c017084c7fc23c955e0c33e13e0226 Mon Sep 17 00:00:00 2001 From: Nick Dandoulakis Date: Fri, 5 Jan 2018 22:28:27 +0200 Subject: [PATCH] CS_DBLCLKS support for DirectX 11 --- examples/directx11_example/imgui_impl_dx11.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/directx11_example/imgui_impl_dx11.cpp b/examples/directx11_example/imgui_impl_dx11.cpp index af6e54f49..7016301b2 100644 --- a/examples/directx11_example/imgui_impl_dx11.cpp +++ b/examples/directx11_example/imgui_impl_dx11.cpp @@ -253,13 +253,16 @@ IMGUI_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wPa switch (msg) { case WM_LBUTTONDOWN: + case WM_LBUTTONDBLCLK: case WM_RBUTTONDOWN: + case WM_RBUTTONDBLCLK: case WM_MBUTTONDOWN: + case WM_MBUTTONDBLCLK: { int button = 0; - if (msg == WM_LBUTTONDOWN) button = 0; - if (msg == WM_RBUTTONDOWN) button = 1; - if (msg == WM_MBUTTONDOWN) button = 2; + if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) button = 0; + if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) button = 1; + if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) button = 2; if (!IsAnyMouseButtonDown() && GetCapture() == NULL) SetCapture(hwnd); io.MouseDown[button] = true;