
-----------------------------------
chaos
Fri Jan 21, 2011 5:42 pm

Main menu
-----------------------------------
How would i go about creating a main menu ehich includes play,settings, and instructions for a game?

-----------------------------------
ProgrammingFun
Fri Jan 21, 2011 5:45 pm

RE:Main menu
-----------------------------------
Please elaborate...in GUI?

-----------------------------------
Insectoid
Fri Jan 21, 2011 7:00 pm

RE:Main menu
-----------------------------------
You need to put everything into separate procedures, ie the game is in a procedure, instructions are in a procedure, settings are in a procedure, etc. You then need to create some way of allowing the user to call those procedures, weather by text or buttons.

-----------------------------------
chaos
Sat Jan 22, 2011 10:42 am

Re: Main menu
-----------------------------------
I understand connecting that part, but its the part of connecting what procedure to what procedure that confuses me. I might start out with text first, and then convert everything to GUI

-----------------------------------
TokenHerbz
Sat Jan 22, 2011 10:50 am

RE:Main menu
-----------------------------------
okay so have it set up so if "ESC" key is pressed, "brings up the menu" // lets you change things in this menu.  when your done, you go back to the game...  Heres a VERY basic idea.

[code]
proc menu
     loop
          menu stuff here
          exit when menu stuff is done
     end loop
end menu

loop
     inputs
     if inputs = menu call then
         call menu
     end if
     game stuff here
     draw game stuff here
end loop
[/code]
