So I was tryint to make a title screen for a game and wanted to allow to player to see what option they have selected. This is my Code:
Thanks!
public class Controls extends Actor
{
GreenfootImage Controls;
GreenfootImage Red_Controls;
public void act()
{
if (Greenfoot.mouseClicked(this))
{
Greenfoot.setWorld(new controlls());
}
if (Greenfoot.mouseMoved(this))
{
setImage(Red_Controls);
}
else if(Greenfoot.mouseMoved(this)==false)
{
setImage(Controls);
}
}
public Controls()
{
Controls = new GreenfootImage("Controls.png");
Red_Controls= new GreenfootImage("Red_Controls.png");
}
}
