I dont know how to do the mouseclicked, the documentation says mouseclicked, but it doesn't work.
if (Greenfoot.mouseClicked(null)) // true for any click // or if (Greenfoot.mouseClicked(this)) // true if current object is clicked
Actor btnYes = new Button("Yes");
Actor btnNo = new Button("No");if (Greenfoot.mouseClicked(btnYes))
{
// some action
}
if (Greenfoot.mouseClicked(btnNo))
{
// some other action
}