void GesichtertauschApp::keyDown( KeyEvent pEvent ) { switch(pEvent.getChar()) { case 'd': mGui->dump(); break; case 'l': mGui->load(getResourcePath(RES_SETTINGS)); break; case 's': mGui->save(getResourcePath(RES_SETTINGS)); break; // case 'm': // CGDirectDisplayID mDisplayID = getSettings().getDisplay()->getCGDirectDisplayID(); // CGDisplayConfigRef pConfigRef; // CGBeginDisplayConfiguration (&pConfigRef); // CGConfigureDisplayOrigin (pConfigRef, // mDisplayID, // -100, 0); // CGCompleteDisplayConfiguration (pConfigRef, kCGConfigureForAppOnly); // break; } switch(pEvent.getCode()) { case KeyEvent::KEY_ESCAPE: setFullScreen( false ); quit(); break; case KeyEvent::KEY_SPACE: mGui->setEnabled(!mGui->isEnabled());break; } }
void ScheinrieseApp::keyDown( KeyEvent event ) { switch(event.getChar()) { case 'd': mGui->dump(); break; case 'l': mGui->load(getResourcePath(RES_SETTINGS)); break; case 's': mGui->save(getResourcePath(RES_SETTINGS)); break; } switch(event.getCode()) { case KeyEvent::KEY_ESCAPE: quit(); break; case KeyEvent::KEY_SPACE: mGui->setEnabled(!mGui->isEnabled()); } }