pygame is
Simple DirectMedia Layer is
Site Swing
Simple Pygame Menu

Simple Pygame Menu - 1.2

Gummbum (gummbum)



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.


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


  • Added class NonBlockingPopupMenu to simplify use.
  • Added exception handlers around "import data" and font initialization. If the cannot be imported, or the preferred font cannot be loaded from file, the default system font is quietly used. This supports less restrictive inclusion in other libraries.
  • Added pos=None parameter to constructors to provide the option of explicit positioning.
  • Added class SubmenuLabel for strong-typing of submenu text in menus. This allows PopupMenu.handle_events() to accurately detect submenus as opposed to the previous trick endswith('...'). It also lifts the restriction implied by depending on endswith('...'), so coders are free to put any text they want in labels without side-effects.
  • Tweaked demos.
  • Links

    Home Page:


    click to view original size


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

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

    No user comments have been submitted.

    our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
    recent releases
    Oct 9, 2015

    Sep 11, 2015

    Sep 6, 2015

    Aug 26, 2015

    Aug 25, 2015

    Aug 21, 2015

    Aug 16, 2015

    Jul 30, 2015

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