Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

How to properly hide cursor?

A topic by jefvel created Mar 25, 2023 Views: 277 Replies: 4
Viewing posts 1 to 2

Hello,! Thanks for this extension, it’s really neat!

I’m not sure how to conditionally hide the cursor though. If I try creating a cursor out of an empty sprite, it turns into a black square. I’ve also tried to not run the native_cursor functions and just do window_set_cursor(cr_none);. But then once I make the cursor visible again, it wont show up again unless I move the mouse. And it also occasionally flickers when turning visible again.

Developer(+1)

As far as I can tell,

window_set_cursor(cr_none);
native_cursor_reset();

should work because the extension will ask GM to update the cursor.

This hides it correctly, but if you then call native_cursor_set and native_cursor_update, the cursor will remain invisible until you move the mouse

Developer(+1)

Set it to any other native cursor and back immediately - there is currently a bug with detecting whether there’s a need to change the cursor.

Thanks! This solved the issue :)