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

2013/9/17

[URGENT] Help with the class MouseInfo

matheusdcb matheusdcb

2013/9/17

#
Personal following: I want to control the mouse in my game, but I can not. It aims to click a button (which I defined a class Pause), and when this button is pressed, the game (with Greenfoot.stop ()). Does anyone know how I can do this? Thank you.
Zamoht Zamoht

2013/9/17

#
In the button class (Pause I guess) you put something like this in the act() method:
public void act()
{
     if (Greenfoot.mouseClicked(this))
     {
          Greenfoot.stop();
     }
}
matheusdcb matheusdcb

2013/9/17

#
're Not working out anyway '-'. No need to enable the mouse in Word there not? I learned that you need, but do not know how to do - '
You need to login to post a reply.