Add cursor condition to check if mouse button is held down

This commit is contained in:
WarmUpTill
2026-11-06 20:46:32 +01:00
parent b7bf68615d
commit b3f47cdb68
6 changed files with 54 additions and 1 deletions

View File

@@ -278,6 +278,21 @@ std::chrono::high_resolution_clock::time_point GetLastMouseRightClickTime()
return lastMouseRightClickTime;
}
bool IsMouseLeftButtonDown()
{
return GetAsyncKeyState(VK_LBUTTON) & 0x8000;
}
bool IsMouseMiddleButtonDown()
{
return GetAsyncKeyState(VK_MBUTTON) & 0x8000;
}
bool IsMouseRightButtonDown()
{
return GetAsyncKeyState(VK_RBUTTON) & 0x8000;
}
static void handleRawMouseInput(LPARAM lParam)
{
UINT dwSize;