Table of Contents

 
Hey! Where's My Cursor?
 

Now if we had created a fullscreen application instead of a windowed one, the first thing you would have noticed is that your cursor would be gone. Why? You've played fullscreen games before and never lost your cursor. What the heck? Well the truth is fullscreen applications don't use the system cursor, so you have to create your own. Fortunately that's not hard.

Creating the Cursor

I'm sure you know where we're going - yup, to the Cursor Data tab. Create a new object and open its properties. We're going to have to name this cursor "default" whether you like it or not. This is because if the application detects that its loaded in a cursor named "default", it will automatically load it as the default cursor and display it. If we named it anything else I would have had to added code to show the cursor. This way is much easier for me and you. So name your cursor object "default" and select your cursor image object from the Cursor Image combo box. (Remember how the scene window refused to display bound objects? Well here it's just the opposite - a combo box like this will refuse to display un-bound objects. Just a little something to keep you in line). Finally, change the orientation of the cursor to Upper-Left. The orientation lets us choose where on the cursor image the actual cursor location will be. So for example if we had a targeting reticule cursor, we would probably want a Center orientation. Or, if we had an eyedropper cursor, we would probably want a Bottom-Right orientation.

Now close the window and save your progress. Generate some new data and run the application. When you move the mouse cursor over the application window it will change from the system cursor to the application cursor. How easy was that? Images are fun - let's do some more.

 

Prev: Sight to the Sound