MCPcopy Create free account
hub / github.com/YCAMInterlab/Duration / draw

Method draw

Duration/src/DurationController.cpp:1211–1240  ·  view source on GitHub ↗

--------------------------------------------------------------

Source from the content-addressed store, hash-verified

1209
1210//--------------------------------------------------------------
1211void 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//--------------------------------------------------------------
1243void DurationController::keyPressed(ofKeyEventArgs& keyArgs){

Callers

nothing calls this directly

Calls 1

getTrackMethod · 0.80

Tested by

no test coverage detected