| 36 | } |
| 37 | |
| 38 | void BasicApp::keyDown( KeyEvent event ) |
| 39 | { |
| 40 | if( event.getChar() == 'f' ) { |
| 41 | // Toggle full screen when the user presses the 'f' key. |
| 42 | setFullScreen( ! isFullScreen() ); |
| 43 | } |
| 44 | else if( event.getCode() == KeyEvent::KEY_SPACE ) { |
| 45 | // Clear the list of points when the user presses the space bar. |
| 46 | mPoints.clear(); |
| 47 | } |
| 48 | else if( event.getCode() == KeyEvent::KEY_ESCAPE ) { |
| 49 | // Exit full screen, or quit the application, when the user presses the ESC key. |
| 50 | if( isFullScreen() ) |
| 51 | setFullScreen( false ); |
| 52 | else |
| 53 | quit(); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | void BasicApp::draw() |
| 58 | { |
nothing calls this directly
no test coverage detected