<div class="gmail_quote">On Tue, Jun 9, 2009 at 10:31 PM, Essah Mitges <span dir="ltr">&lt;<a href="mailto:e_mitges@hotmail.com">e_mitges@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">





<div>i don&#39;t know if its what i am searching that is wrong but what i am trying to do is<br>link my game i made in pygame to my pygame menu the menu has 4 button classes on it one foe instruction one to quit one for high scores and one to start the game<br>

the 3 other buttons work all but the one to start the game this is basicly the menu i want people to see first the main menu</div></blockquote><div><br></div><div>So why don&#39;t you put your menu in your game? </div><div>

<br></div><div>Consider the following:</div><div><br></div><div># Lamegame.py - probably the lamest game ever!</div><div><br></div><div>print &quot;Welcome to Lame Game!&quot;</div><div>raw_input(&quot;Please type something and press enter: &quot;)</div>

<div>print &quot;You win!&quot;</div><div><br></div><div>So there&#39;s a game. Now let&#39;s add a menu:</div><div><br></div><div># lamegameimproved.py - the lamest game, now with a menu!</div><div><br></div><div>import sys</div>

<div><br></div><div>print &quot;Welcome to Lame Game!&quot;</div><div>print &quot;\nMenu:\n&quot;</div><div>print &quot;(Q)uit&quot;</div><div>print &quot;(P)lay&quot;</div><div>choice = raw_input(&quot;Your Choice? (P or Q): &quot;)</div>

<div><br></div><div>if choice.lower() == &#39;q&#39;:</div><div>    sys.exit(0)</div><div>elif choice.lower() == &#39;p&#39;:</div><div>    # add original code here</div><div><br></div><div>See? Quite simple. Even with pygame it shouldn&#39;t be a whole lot more complex than that. And that&#39;s really the most simple example I could think of and it&#39;s really not very good. For instance you could put the original code into a &quot;game&quot; function and then call it if the choice was P.</div>

<div><br></div><div>HTH,</div><div>Wayne</div></div>