RustAudio / baseview

low-level window system interface for audio plugin UIs
Apache License 2.0
259 stars 54 forks source link

Handle set_mouse_cursor event on windows #186

Closed Fredemus closed 3 months ago

Fredemus commented 3 months ago

This adds the ability to change the cursor on Windows platforms. For some reason there are very few default cursors included in Windows so a lot of cursors available on other platforms aren't available yet, which is why many of the MouseCursor options just maps to IDC_ARROW. I'll look into adding custom cursors next.

LoadCursorW is supposedly superseded by LoadImageW but I couldn't find a way to do it with that one that doesn't crash.

Tested with Vizia's cursor icon example here and everything seems to work as it should. Also tested by hovering over some buttons on a plugin.