Update ProgramDesign

Tim Young 2017-10-04 03:24:25 +02:00
parent 39972da20b
commit b16db1f478

@ -63,6 +63,8 @@ CheckForChangeInLevel();
## Making a Game Menu ## Making a Game Menu
Your Menu is usually set up by creating a bunch of functions, one for each MenuButtonSprite. A MenuButtonSprite is basically a sprite that does something when you click it. Your Menu is usually set up by creating a bunch of functions, one for each MenuButtonSprite. A MenuButtonSprite is basically a sprite that does something when you click it.
![A menu image](images/MenuExitSprite.png)
For an example, we will use an “exit” sprite button. This button will look something like the one on the left. We load the sprite as three different animations. The first one, at the top, we will use for when we show the menu. The second menu item is just a little bit lighter in color, and we will use that when we mouse-over the menu item. And we will use the green one when we click on it. For an example, we will use an “exit” sprite button. This button will look something like the one on the left. We load the sprite as three different animations. The first one, at the top, we will use for when we show the menu. The second menu item is just a little bit lighter in color, and we will use that when we mouse-over the menu item. And we will use the green one when we click on it.
We will want to have some functions for this button. Lets call them ExitClick, ExitMouseOver, and ExitMouseLeave. We will want to have some functions for this button. Lets call them ExitClick, ExitMouseOver, and ExitMouseLeave.