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

Re: [pygame] PGU and Text Boxes



andrew, i remove the argv, and it works =D thanks


On 5/10/06, andrew baker <failrate@xxxxxxxxx> wrote:



On 5/10/06, Chuang Wu <chuangwoo@xxxxxxxxx> wrote: > Hi there, > > I got a TypeError of the code > > > if pygame.font: > 聽聽聽聽聽聽聽聽font = pygame.font.Font(None, 36) > 聽聽聽聽聽聽聽聽text = font.render("Pummel The Chimp, And Win $$$", 1, (10, 10, 10)) > 聽聽聽聽聽聽聽聽textpos = text.get_rect(center=(100,100)) > > The error is the get_rect function, it saids get_rect took no keyword > arguments, but I did use 'center' as the keyword.



Don't use center as a keyword.聽 Don't use a keyword.

get_rect
 Surface.get_rect() -> rect
Returns a new rectangle covering the entire surface. This rectangle will
always start at 0, 0 with a width. and height the same size as the image.


In fact, it looks like get_rect() doesn't take ANY arguments. 聽


-- Andrew Ulysses Baker "failrate"