--------------------------------------------------------------
| 1209 | |
| 1210 | //-------------------------------------------------------------- |
| 1211 | void DurationController::draw(ofEventArgs& args){ |
| 1212 | |
| 1213 | //go through and draw all the overlay backgrounds to indicate 'hot' track sfor recording |
| 1214 | ofPushStyle(); |
| 1215 | map<string, ofPtr<ofxTLUIHeader> >::iterator trackit; |
| 1216 | for(trackit = headers.begin(); trackit != headers.end(); trackit++){ |
| 1217 | //TODO: check to make sure recording is enabled on this track |
| 1218 | //TODO: find a way to illustrate 'invalid' output sent to this track |
| 1219 | float timeSinceInput = recordTimer.getAppTimeSeconds() - trackit->second->lastInputReceivedTime; |
| 1220 | if(timeSinceInput > 0 && timeSinceInput < 1.0){ |
| 1221 | //oscilating red to indicate active |
| 1222 | ofSetColor(200,20,0,(1-timeSinceInput)*(80 + (20*sin(ofGetElapsedTimef()*8)*.5+.5))); |
| 1223 | ofRect(trackit->second->getTrack()->getDrawRect()); |
| 1224 | } |
| 1225 | } |
| 1226 | ofPopStyle(); |
| 1227 | |
| 1228 | timeline.draw(); |
| 1229 | gui->draw(); |
| 1230 | |
| 1231 | if(needsSave || timeline.hasUnsavedChanges()){ |
| 1232 | ofPushStyle(); |
| 1233 | ofSetColor(200,20,0, 40); |
| 1234 | ofFill(); |
| 1235 | ofRect(*saveButton->getRect()); |
| 1236 | ofPopStyle(); |
| 1237 | } |
| 1238 | drawTooltips(); |
| 1239 | //drawTooltipDebug(); |
| 1240 | } |
| 1241 | |
| 1242 | //-------------------------------------------------------------- |
| 1243 | void DurationController::keyPressed(ofKeyEventArgs& keyArgs){ |