This site requires JavaScript, please enable it in your browser!
Greenfoot back
Green_Javax814
Green_Javax814 wrote ...

2011/9/1

How to hide the Mouse Cursor

Green_Javax814 Green_Javax814

2011/9/1

#
Hello there, I am currently making a mouse shooting game...... I want to make the player shoot a bullet towards the mouse cursor and so i want to change the mouse cursor in into a crosshair. Can anyone help me? Please.... ): Greetings - GreenJavax814
mjrb4 mjrb4

2011/9/1

#
Hi, You can create an actor as a crosshair and update its position in the world based on where it is with the mouse, (use Greenfoot.getMouseInfo()) and then getX() and getY() on the mouseinfo object after checking it's not null) but hiding the mouse cursor itself is a bit more difficult. Have a look here: http://greenfootgallery.org/scenarios/2828 for a demo if you still want to do it.
Busch2207 Busch2207

2011/9/1

#
I think he don't want to see the mouse-image... For this take a look at this project: http://www.greenfootgallery.org/scenarios/3438 There I published the mouse class, that I'm using for my projects. :) May it helps you, too! :)
Green_Javax814 Green_Javax814

2011/9/5

#
Thanks Dude! :)
You need to login to post a reply.