| 148 | } |
| 149 | |
| 150 | void AppTestApp::keyDown( KeyEvent event ) |
| 151 | { |
| 152 | if( event.getChar() == 'f' ) { |
| 153 | setFullScreen( ! isFullScreen() ); |
| 154 | } |
| 155 | else if( event.getChar() == 'o' ) { |
| 156 | auto filePath = getOpenFilePath(); |
| 157 | CI_LOG_I( "result of getOpenFilePath(): " << filePath ); |
| 158 | } |
| 159 | else if( event.getChar() == 'p' ) { |
| 160 | auto filePath = getFolderPath(); |
| 161 | CI_LOG_I( "result of getFolderPath(): " << filePath ); |
| 162 | } |
| 163 | else if( event.getChar() == 's' ) { |
| 164 | auto filePath = getSaveFilePath(); |
| 165 | CI_LOG_I( "result of getSaveFilePath(): " << filePath ); |
| 166 | } |
| 167 | else if( event.getChar() == 'r' ) { |
| 168 | // iterate through some framerate settings |
| 169 | int targetFrameRate = (int)lround( getFrameRate() ); |
| 170 | if( ! isFrameRateEnabled() ) { |
| 171 | CI_LOG_I( "setting framerate to 60" ); |
| 172 | setFrameRate( 60 ); |
| 173 | } |
| 174 | else if( targetFrameRate == 60 ) { |
| 175 | CI_LOG_I( "setting framerate to 30" ); |
| 176 | setFrameRate( 30 ); |
| 177 | } |
| 178 | else if( targetFrameRate == 30 ) { |
| 179 | CI_LOG_I( "disabling framerate" ); |
| 180 | disableFrameRate(); |
| 181 | } |
| 182 | else { |
| 183 | CI_ASSERT_NOT_REACHABLE(); |
| 184 | } |
| 185 | } |
| 186 | else if( event.getChar() == 'v' ) { |
| 187 | gl::enableVerticalSync( ! gl::isVerticalSyncEnabled() ); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | void AppTestApp::mouseDown( MouseEvent event ) |
| 192 | { |
nothing calls this directly
no test coverage detected