mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-23 04:17:00 +00:00
Examples: DX9, DX11: mapping missing middle mouse button.
This commit is contained in:
parent
08b345efd9
commit
822eaf1751
@ -189,6 +189,12 @@ IMGUI_API LRESULT ImGui_ImplDX11_WndProcHandler(HWND, UINT msg, WPARAM wParam, L
|
|||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
io.MouseDown[1] = false;
|
io.MouseDown[1] = false;
|
||||||
return true;
|
return true;
|
||||||
|
case WM_MBUTTONDOWN:
|
||||||
|
io.MouseDown[2] = true;
|
||||||
|
return true;
|
||||||
|
case WM_MBUTTONUP:
|
||||||
|
io.MouseDown[2] = false;
|
||||||
|
return true;
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
io.MouseWheel += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
|
io.MouseWheel += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
|
||||||
return true;
|
return true;
|
||||||
|
@ -150,6 +150,12 @@ IMGUI_API LRESULT ImGui_ImplDX9_WndProcHandler(HWND, UINT msg, WPARAM wParam, LP
|
|||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
io.MouseDown[1] = false;
|
io.MouseDown[1] = false;
|
||||||
return true;
|
return true;
|
||||||
|
case WM_MBUTTONDOWN:
|
||||||
|
io.MouseDown[2] = true;
|
||||||
|
return true;
|
||||||
|
case WM_MBUTTONUP:
|
||||||
|
io.MouseDown[2] = false;
|
||||||
|
return true;
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
io.MouseWheel += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
|
io.MouseWheel += GET_WHEEL_DELTA_WPARAM(wParam) > 0 ? +1.0f : -1.0f;
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user