mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-26 10:24:14 +08:00
Fix menu buttons not working in Aoe2DE.
This commit is contained in:
parent
e0af318948
commit
6d96784af1
@ -270,8 +270,8 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARA
|
|||||||
if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
|
if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
|
||||||
if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
|
if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
|
||||||
if (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONDBLCLK) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
|
if (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONDBLCLK) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
|
||||||
if (!ImGui::IsAnyMouseDown() && ::GetCapture() == NULL)
|
// if (!ImGui::IsAnyMouseDown() && ::GetCapture() == NULL)
|
||||||
::SetCapture(hwnd);
|
// ::SetCapture(hwnd);
|
||||||
io.MouseDown[button] = true;
|
io.MouseDown[button] = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -286,8 +286,8 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARA
|
|||||||
if (msg == WM_MBUTTONUP) { button = 2; }
|
if (msg == WM_MBUTTONUP) { button = 2; }
|
||||||
if (msg == WM_XBUTTONUP) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
|
if (msg == WM_XBUTTONUP) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
|
||||||
io.MouseDown[button] = false;
|
io.MouseDown[button] = false;
|
||||||
if (!ImGui::IsAnyMouseDown() && ::GetCapture() == hwnd)
|
// if (!ImGui::IsAnyMouseDown() && ::GetCapture() == hwnd)
|
||||||
::ReleaseCapture();
|
// ::ReleaseCapture();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
case WM_MOUSEWHEEL:
|
case WM_MOUSEWHEEL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user