New HUD feature: mouse cursor

I added support for a custom mouse cursor to the HUD.

Use it like this:


hud.setCursor( cursorTexture );

You can additionally set the cursor’s visibility by


hud.setCursorVisibility( boolean );

And you should also call:


canvas.hideMouseCursor();

to hide the system mouse cursor.

Enjoy :)!

Marvin

Great ! I though about implementing that when designing my game, so really cool !

Thanks :). I forgot to commit the cursor image. It is now committed.

I will further pimp the cursor functionality by providing a CursorCollection class instance, where one can set one cursor texture for each element of an enum {POINTER, HAND, CROSSHAIR, etc…}. Then the current cursor would be selectable by invoking hud.setCursor( TheEnum );

And I will provide a methd on the HUD to set a crosshair image for a first person shooter crosshair (always centered).

Marvin