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

[pygame] beginner problem.



Hi. im trying to get started with pygame but have runned in to some problem.

the cobe below will show a window with a bg but not the text. what am
I doing wrong?

import pygame ,sys
from pygame.locals import *
if not pygame.font: print 'Warning, fonts disabled'
if not pygame.mixer: print 'Warning, sound disabled'

pygame.init()
screen = pygame.display.set_mode((468, 60))
pygame.display.set_caption('Monkey Fever')
pygame.mouse.set_visible(1)

background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill((130, 120, 210))
screen.blit(background, (0, 0))

font = pygame.font.SysFont("fixed", 20)
text = font.render("Pummel", 0, (100, 100, 100))
background.blit(text,(0,0) )

while 1:
        pygame.display.flip()



cheers
elvelind