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

Fwd: [pygame] font/text in pygame



One last font question:

My code for lining up the two columns (score and name, both
left-aligned), worked in the sample program:

slip = 30 - len(name)
slip_amt = slip*" "

But it's not lining them up on my screen now? the character between
the " "s is just a space.  Is there a more controlled/uniform way to
add in spaces? I figured if, say, the name was 6 letters long, then it
would push the score 24 spaces over (30-6) so that the score would be
lined up on 30. Which *was* how it worked before.

I'm still working on the centering part. (I dont want each LINE of
text to be centered, since I want the columns to line up, but I do
want the whole "table" centered x-wise. So I'm working on it).

Thanks for any suggestions about the spacing :)

---------- Forwarded message ----------
From: Daniel Bickett <dbickett@xxxxxxxxx>
Date: Apr 27, 2005 1:44 PM
Subject: Re: [pygame] font/text in pygame
To: pygame-users@xxxxxxxx


On 4/27/05, Sami Hangaslammi <sami.hangaslammi@xxxxxxxxx> wrote:
> Let the library do the work for you. ;)

A fine suggestion ;) Thanks for that tip.

--
Daniel Bickett
dbickett at gmail.com
http://heureusement.org/