Hi I'm trying the following code that makes the objet show the text letter by letter until the sentence is completed
There are 2 problems:
1) the \n works but the following text is written in the middle of the image (i want it written on the left)
2) when the 2nd line is completed it begin writing on the 1st line again...
This is the code in my World class:
Thank you!!
String writing = "";
int i = 0;
public void writeText(String text)
{
char[] letters = text.toCharArray();
int length = text.length();
if(i<length)
{
writing+= letters[i];
i++;
}
GreenfootImage write = new GreenfootImage(writing, 24, Color.GREEN, new Color(0,0,0,0));
image.drawImage(write, 15, 0);
}addObject(new Informations2("Ceci est un test \n il y a ici un retour \n à la ligne", 250, 150), 300, 300);


