Jump to content
  • Advertisement
Sign in to follow this  

Changing mouse cursor and making it always on top in console

This topic is 3690 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

In some console game I saw floating around here (think it was Space Cowboys or something in the 3 hour game challenge), the cursor was changed to something different. The only way I've thought of doing something like this is to draw a character at the mouse x,y coordinates every time there's a mouse event. Is this how it should be done or is there a more proper way? Also, how do I make it so the cursor is always on top? If I fill the whole buffer with 0xDB or whatever so it's a clear screen, the cursor won't show up above that. If I do the above method, it always shows up but then my program just turns into a paint program and draws the cursor wherever I move mouse. I guess I have to store all the coordinates adjacent to the mouse in a temp variable to redraw what should be there as I move it. I think this is probably the way to go but I only want to go this route if it's the only way though because it seems like there'd be something in windows.h or whatever to do this already. Thanks. edit: I think I figured it out using the above method and storing what's around the cursor as I draw it but if anyone knows better, I'd be happy to hear it!

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.

GameDev.net 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!