I am trying to print a json line by line in a pygame window. The thing is, I can't go on a new line. I wrote this code:
def printDict(griglia, nRighe, nColonne, cella, jsonTesto):
textsurface = myfont.render(jsonTesto, False, (255, 255, 255))
screen.fill(pygame.Color("yellow"), (0, nRighe*cella+2*cella*cella, nColonne*cella+cella, nRighe*cella+3*cella*cella))
screen.blit(textsurface, (cella, nRighe*cella+4*cella))
pygame.display.update()
It prints where I want and covering old written things, but when I get the result, it is inline and has "]" where it should go on a new line.
Alternatively, can you help me by putting constraits? I mean, is it possible to make the text go on a new line when the window ends?
Can you help me please?