pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Simple Pygame Menu

Simple Pygame Menu - 1.0

Gummbum (gummbum)

Tags:

Description

A low-fuss, infinitely nested popup menu for pygame. It don't get no simpler den dis.

Inspired by SimpleMenu for pyglet.

I couldn't find one of these for pygame, so I wrote one and decided to make it reusable. Hope you enjoy.

Gumm


menu_data = (
    'Main',
    'Item 0',
    'Item 1',
    (
        'Things',
        'Item 0',
        'Item 1',
        'Item 2',
        (
            'More Things',
            'Item 0',
            'Item 1',
        ),
    ),
    'Quit',
)
PopupMenu(menu_data)
for e in pygame.event.get():
    if e.type == USEREVENT and e.code == 'MENU':
        print 'menu event: %s.%d: %s' % (e.name,e.item_id,e.text)
        if (e.name,e.text) == ('Main','Quit'):
            quit()

Links

Home Page: http://code.google.com/p/simple-pygame-menu/
Source: http://simple-pygame-menu.googlecode.com/svn/trunk/

Screenshot


click to view original size

Releases

Simple Pygame Menu - 1.2 - Dec 7, 2010
Simple Pygame Menu - 1.0 - Dec 4, 2010

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

No user comments have been submitted.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

Nov 24, 2016

Nov 20, 2016

Nov 14, 2016


Nov 6, 2016

Nov 5, 2016


Oct 22, 2016

Oct 11, 2016

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)