[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] File Copying



Ian Mallett wrote:
OK, that too bad. I don't suppose pygame has a suggestion box. (Other than that in the docs).
You could easily write a class that did multi-line text.
That's probably why it's not included in Pygame.
All the text processing you need to do - centering text, word-wrap, etc. - are all things you do yourself in python, and you pass the text for each line after it's been processed to the font rendering.
Part of the reason for this is probably because that's how SDL does it.
HTH,
-Luke

On 7/8/07, *Luke Paireepinart* < rabidpoobear@xxxxxxxxx <mailto:rabidpoobear@xxxxxxxxx>> wrote:

    Ian Mallett wrote:
    > New issue:  If I do something like:
    >
    > font = pygame.font.SysFont("Times New Roman", 12)
    > FontObject = font.render("""this is line 1
    > this is line 2
    > this is line 3""", 1, (255,255,255), (3,3,3))
    > surface.blit(FontObject, (0,0))
    >
    > instead of putting a newline thing it puts a rectangle and a
    space.  I
    > remember the docs saying to do it that way though...
    The font object's render method doesn't do newlines.
    It says that in the docs.
    You have to render each line of text seperately.
    -Luke