Advertisement Jump to content
Sign in to follow this  

Default SDL Cursors?

This topic is 3656 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, I would like to change the cursor for my application when they roll over a button or etc... So, that means that I either need to make my own cursor or use the default ones in SDL. My problem is that I don't know how to change the cursor to another default cursor... By default, I mean not a custom one that I made... I'm almost entirely sure that there are several built-in cursors for SDL, but I can't find a list of them or how to use them... I would very much like to know if their are any SDL cursors, and if there are then I'd like to know how to use them... If there aren't any default ones, can someone explain how to get SDL to get the cursor from a bitmap or .cur file? (This cursor change is mainly just so I can demonstrate it basically... I don't really care if the defaults look bad etc. Just tell me the easy / best way to get a cursor to change on my screen please). By cursor, I mean the image for my cursor by the way... -- If you don't understand what I mean, if I'm saying something wrong or you need additional information just leave a post asking about it please ^_^ --

Share this post

Link to post
Share on other sites
this is the opengl forum so I assume youre using SDL+opengl

then forget about OS cursors
SDL_ShowCursor( SDL_DISABLE );
to hide the cursor + then just draw a texture where the cursor is, this way the cursor can be animated/unlimited colors/size etc

practically every existing game does it this way

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!