Re: [Tutor] font/text in pygame

2005-04-27 Thread Jacob S.
def displaybalance(): for score, name in mylist: slip = 30 - len(name) slip_amt = slip* print %s%s%s % (name,slip_amt,score) (I did this with the print command to make sure it would produce what I wanted, three strings for the three sample scores I put in this dummy

Re: [Tutor] font/text in pygame

2005-04-27 Thread D. Hartley
Jacob (et al): Unfortunately at this point I'm rendering the text, not printing it (using text = font.render). So I need to know if there is a hard character or something I can type, since 50* (space) isnt lining them up right. Thanks! ~Denise On 4/27/05, Jacob S. [EMAIL PROTECTED] wrote:

Re: [Tutor] font/text in pygame

2005-04-26 Thread Max Noel
On Apr 26, 2005, at 23:57, D. Hartley wrote: But in any case, font/text will only take strings - i cant pass in a list, or an index to an item in a list (which is, in this case, a tuple), and since the items in the list will be changed and updated obviously i cant just type in the items as strings

Re: [Tutor] font/text in pygame

2005-04-26 Thread D. Hartley
Max (et al.): I tried to do it that way (score, name, posY etc) and it told me too many values to unpack. But I did get it to work the following way: # Display some text x, y = 230, 270 for score, name in mylist: slip = 30 - len(name) slip_amt = slip*

Re: [Tutor] font/text in pygame

2005-04-26 Thread D. Hartley
P.S. I should also add that the print commands embedded within the add_score function ARE displaying at the appropriate time (i.e., before I have to hit y/n). Of course they're in the text/console window, but it does tell me that it's executing that add_score function at the right point in time.