I haven't coded in awhile and I reloaded some of my old code after updating Greenfoot. As you can imagine my color/font code no longer works (Incompatible types. I'd rather use the update Greenfoot for future coding but I'm rusty to everything and don't know how I would approach coding the color and font again in the new format.
Here is the code for my on screen text:
public void createImage(){
text = text+"\n";
String[] lines = text.split("\r\n|\r|\n");
int longestString = longestSringLength(lines);
image = new GreenfootImage((int)((size * longestString) /1.6),(lines.length * size) + size +5);
image.setColor(new Color(255,255,255, 128));
image.fillRect(0, 0, (int)((size * longestString)/1.6+size), (lines.length * size) + size + 5);
image.setColor(new Color(0, 0, 0, 128));
image.fillRect(5, 5, (int)((size * longestString)/1.6-10), ((lines.length * size)+ (size -5)));
font = new Font("courier",0,size);
font = font.deriveFont((float)size);
image.setFont(font);
image.setColor(new Color(255,255,255, 255));
font = new Font("courier",0,size);
for(int x = 0;x < lines.length;x++)
{
image.drawString(lines[x],10,(size * x) + (size + 5));
}
}


