, October 10, 2010 1:46:36 PM
*Subject:* Re: [pygame] Surface blitting not effective
There are a couple of things happening in this program which make it
hard to know what is happening with the alpha blit. First, the display
surface is blitted to itself:
class Game(object):
def __init__
Change the surface convert to convert_alpha() and filling will work again.
Since you are just converting the best it can do are full surface alpha
and/or colorkeys
On Sun, Oct 10, 2010 at 7:21 AM, Julian Marchant onp...@yahoo.com wrote:
Ok, one major problem solved, and after much investigating
Attached is the file in question, comet_fighter.py (version 0.1.0.5).
Game.menu() is supposed to show a menu. It takes the following arguments:
options, cursor, anim_wait, color=pygame.Color(0,0,0,155), border=16, sep=8
options is a list of surfaces used for the menu choices. cursor is a list
Your blits were copying the source to positions outside the target surface.
I always suspect this if I can't see my graphics. You can insert statements
like dlgsurface.get_rect().collidepoint(choicerect.topleft) or print
dlgsurface.get_rect().colliderect(choicerect) to tell whether the source
rect