winapi cursor state improvements
This commit is contained in:
@@ -303,6 +303,25 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
case WM_SETCURSOR:
|
||||
switch (LOWORD(lParam))
|
||||
{
|
||||
case HTBOTTOM:
|
||||
case HTBOTTOMLEFT:
|
||||
case HTBOTTOMRIGHT:
|
||||
case HTLEFT:
|
||||
case HTRIGHT:
|
||||
case HTTOP:
|
||||
case HTTOPLEFT:
|
||||
case HTTOPRIGHT:
|
||||
// allow the system to handle these window resize cursors:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
default:
|
||||
// notify the engine at other cursor changes to set its own cursor instead
|
||||
wi::input::NotifyCursorChanged();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user