MCPcopy Create free account
hub / github.com/cinder/Cinder / keyDown

Method keyDown

samples/BasicApp/src/BasicApp.cpp:38–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38void 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
57void BasicApp::draw()
58{

Callers

nothing calls this directly

Calls 3

setFullScreenFunction · 0.85
isFullScreenFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected