feat: Change cursor icon (#69)

This commit is contained in:
PUFF_MON
2026-05-14 20:58:05 +02:00
committed by GitHub
parent 9db673dc8d
commit 9b1e25ac01
4 changed files with 46 additions and 0 deletions

View File

@@ -390,6 +390,20 @@ float KeyboardMouseInput::GetLookY(float sensitivity) const
return static_cast<float>(-m_mouseDeltaY) * sensitivity;
}
void KeyboardMouseInput::SetCursorIcon(LPCWSTR cursorName)
{
HCURSOR hCursor = LoadCursorW(nullptr, cursorName);
if (hCursor)
{
SetCursor(hCursor);
if (g_hWnd)
{
SetClassLongPtrW(g_hWnd, GCLP_HCURSOR, (LONG_PTR)hCursor);
}
}
}
void KeyboardMouseInput::OnChar(wchar_t c)
{
int next = (m_charBufferHead + 1) % CHAR_BUFFER_SIZE;