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

2011/6/18

Mouse Buttons

Busch2207 Busch2207

2011/6/18

#
How can you check, which mouse button is pressed?
delmar delmar

2011/6/18

#
After Greenfoot.mousePressed (null) is true, use MouseInfo mouseInfo = Greenfoot.getMouseInfo(); And then you can call the MouseInfo methods, for example if (mouseInfo.getButton == 1) { ... } See MouseInfo in http://www.greenfoot.org/doc/javadoc/ .
Busch2207 Busch2207

2011/6/18

#
Ahh ok! Sry, I haven't seen this Method. xD Thank you very much!
You need to login to post a reply.