The title says it all :-)
My scenario is operated purely by clicking the Act-button, the Run-button is never used.
But I need buttons e.g. to start and stop music playing. I tried the following in my Button-class:
But this leads to a Stackoverflow-error.
Is there any other solution in sight?
Thanks in advance!
public Button()
{
this.waitForButtonClicked();
}
private void waitForButtonClicked() {
while(!Greenfoot.mouseClicked(this)) {
this.waitForButtonClicked();
}
System.out.println("Button was clicked");
this.waitForButtonClicked();
}

