[Tutor] gui menu

Alan Gauld alan.gauld at btinternet.com
Sun Jun 7 23:24:15 CEST 2009

"Essah Mitges" <e_mitges at hotmail.com> wrote

> import sys, pygame
> pygame.init()
> background = pygame.image.load(""My png image 800x 532)
> backgroundRect = background.get_rect()
> size = (width, height) = background.get.size()
> screen = pygame.display.set_mode(size)
> screen.blit(background, backgroundRect)
> pygame.display.flip()
> I want to use pygame to create 4 buttons from 175x67 png image

I dont know what you are using for email but it seems to be
scrambling your messages. I assume what you want is:

> one button that initiates the Team.py file
> one button that links to read a hs.txt
> one button that initiates 800x532 png image in a new window
> one button that quits pygame window

Now, I'm no expert on pygame but can you tell us more
specifically what you are finding so hard about putting
your 4 buttons on the image?

It is creating the button objects or is it linking them to  the functions?
Or is it displaying them using the image?

The more specific your question the more likely that someone
will answer it.

Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list