pygame is
Simple DirectMedia Layer is
Site Swing

dumbmenu - 0.40

Manuel Kammermeier (astorek)



It's another Module to create a Textmenu in a simple way... The Code isn't OOP, just procedual, and the sourcecode... Well, it could be better :) The Downloadable ZIP-File includes the Module and a simple Example; Documentation is the DocString [import dumbmenu; help('dumbmenu')] Maybe someone can use it?...


Home Page:


click to view original size


dumbmenu - 0.40 - Jul 17, 2010 account Comments

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

March 27, 2011 1:38pm - Maxime - nickname: (spacemax) - 4/5
Very good. It will be perfect if you just add an additional option to center the text.
December 29, 2010 8:57pm - Magnus L - nickname: (magnet) - 5/5
I found a much better method to check for keys!

cursorpos = -1
while x <= len(menu):
if event.key == x+pygame.K_1:
cursorpos = x
ArrowPressed = True
exitMenu = True

It should work on any machine linux or windows!
July 18, 2010 2:43am - root9885 - nickname: (root9885) - 3/5
i can't download it from the link~ plz check
March 2, 2010 3:23am - Manuel Kammermeier - nickname: (astorek)
@gio: A Quick'n Dirty (and a VERY ugly) Solution would be:

p = dumbmenu(...)
if p == 0: main(); exit

But I'm sure this is not recommended^^. Typically, I'm use the dumbmenu with an endless While-Loop. The only Possibility to exit the While-Loop is choosing the "right" Menupoint. If another Menupoint was choosen, another function will be called. For example:

loopAgain = True
While loopAgain:
p = dumbmenu(screen,['Start Game','Manual','Quit Game'])
if p == 0: showManual() # Called another function named "showManual"
elif p == 1: startGame() # Called a function named "startGame"
elif p == 2: loopAgain = False # Exit the While-Loop

Hope I could help :)
March 1, 2010 5:34pm - Gio Di Russo - nickname: (bulbear4444)
How would I make it so when the user selects something, it goes to main()?
February 26, 2010 9:21am - Manuel Kammermeier - nickname: (astorek)
Argh, I released that under the wrong license, Sorry about that. The correct License is the "MIT-License". That means: You can do with the program whatever you want - in theory, you could even sell it if you want to do that ;) .
February 26, 2010 7:07am - Gio Di Russo - nickname: (bulbear4444) - 5/5
Very nice. Is it OK if I include the module with a Game Package I'm making?
February 25, 2010 11:40am - the new gammer - nickname: (ok14azertycmoi) - 4/5
it' s cool

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Feb 21, 2017

Jan 31, 2017

Jan 24, 2017

Jan 18, 2017

Jan 7, 2017

Dec 30, 2016

Dec 8, 2016

Nov 28, 2016

Nov 27, 2016

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