Hello everyone,
I'm having a little trouble with my code, and was wondering if you could help.
I'm trying to make it so that when this text gets clicked, it is removed. Does anyone have any suggestions? Thanks in advance!
public void addText()
{
GreenfootImage main = getBackground();
GreenfootImage line01 = new GreenfootImage("Test", 45, WHITE, Color.BLACK);
main.drawImage(line01, (main.getWidth() - line01.getWidth()) / 2, 30);
if (mouseClicked(line01))
{
main.clear()
}
}