Jump to content
  • Advertisement
Sign in to follow this  
fmwyso

Default SDL Cursors?

This topic is 3567 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
Advertisement
this is the opengl forum so I assume youre using SDL+opengl

then forget about OS cursors
use
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 GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!