Example

Tutorial

Click on the example then press escape to bring up the menu. Use the menu with the arrow keys and enter.

Fully understand the concept by watching the tutorial in full screen at high res.

Code Reference

Once you have watched the video, you can refer to the code below to help you make your own that fits your game. Make sure you type it yourself to help you learn.

Your main file should be set up something like this.

In a separate menu file, you can place the following code to init and draw the menu.

The updatePauseMenu function handles up/down arrow input, and running code when selections are made.