[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] beginner problem.
- To: pygame-users@seul.org
- Subject: [pygame] beginner problem.
- From: Elvelind Grandin <elvelind@gmail.com>
- Date: Thu, 28 Oct 2004 20:17:55 +0200
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 28 Oct 2004 14:19:04 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=rYsS+DRN2YEs94ltWq02lM8iJ8R4th6ENz4fKMfSL69wFHu0tc1mXuDhwiysqp90/9sRU06tA7z1W7Zqvqu2ymvIdvjhccHDhFhBPZfNtTQvKZQ91IPqi2qxQHT42THP2Qn8+VjCXogO/ZYjAQPkxv29Apge4BsmK27yckxgd2o=
- Reply-to: pygame-users@seul.org
- Sender: owner-pygame-users@seul.org
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