# CSE 340 Lab 7 (Winter 2020) ## Week 7: Getting started with Menus --- # Menus Timeline - Programming part (Part 0-3) due: Wednesday Feb 26 - Analysis part (Part 4-5) out: Thursday Feb 27 | due: Monday Mar 2 --- # Agenda - Review key concepts for Menus assignment - State Machines - Translate - Callbacks - Work time on Menus assignment - Questions --- # State Machines State Machines are used to respond to incoming events and allow us to store state between events.  --- # Menus State Machine  --- # Translate - Move origin (and everything else) in x and y  ```java translate(float dx, float dy) ``` - How do we use _translate_ in Menus? --- # Callbacks - Callbacks handle application response to events - Update Application Model  --- # Callbacks - Callbacks handle application response to events - Update Application Model - Best implemented using custom listeners 