Added a basic dialog box for a menu; also added a function to map keypresses to specific functions (ESC opens the menu dialog, up arrow moves up).