[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] display.update
- To: pygame-users@xxxxxxxx
- Subject: [pygame] display.update
- From: Luke Miller <dodgyville@xxxxxxxxx>
- Date: Thu, 8 Sep 2005 22:27:30 +1000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Thu, 08 Sep 2005 08:28:39 -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:content-disposition; b=qccjh4rECYRfJEkl9jXXjJ5y3j6bIWzIZvJVP9I1NFK64C6295jg1dk74fFzUCo9FlpGe7+9D29iuG2ARdBRh8/Phgw8XJP7FJ/lVmV4cAn6KQxnKAc+ySbb3SxgRNJE7umg3ETrl3AuDSRg9dAkN0M9SyHD7xQKo3XTaIVuYIQ=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
Hello everyone,
Strange problem that is probably something to do with RenderUpdates or
something.
My game has game sprites and then, overlayed on the screen, some menu
sprites (buttons, etc). Except I find that when I add a large game
sprite, the menu sprites are underneath the game sprite.
This is the code (simplified):
RectsToUpdate = []
gameSprites.update()
RectsToUpdate.extend(gameSprites.draw(.screen))
menuSprites.update()
RectsToUpdate.extend(menuSprites.draw(.screen))
pygame.display.update(RectsToUpdate)
clock.tick(framerate)
gameSprites.clear(screen, background)
menuSprites.clear(screen, background)
As far as I can tell, since menuSprites.update() occurs after the
gameSprite.update(), the menu sprites should be "on top". Any
suggestions?
Thanks,
Luke