Sign in to follow this  

Changing mouse cursor and making it always on top in console

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this