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

Method update

Duration/src/DurationController.cpp:1093–1196  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1091
1092//--------------------------------------------------------------
1093void DurationController::update(ofEventArgs& args){
1094 gui->update();
1095
1096 if(shouldStartPlayback){
1097 shouldStartPlayback = false;
1098 startPlayback();
1099 }
1100 timeLabel->setLabel(timeline.getCurrentTimecode());
1101 playpauseToggle->setValue(timeline.getIsPlaying());
1102
1103 if(audioTrack != NULL && audioTrack->isSoundLoaded()){
1104
1105 if(timeline.getTimecontrolTrack() != audioTrack){
1106 timeline.setTimecontrolTrack(audioTrack);
1107 }
1108
1109 if(audioTrack->getDuration() != timeline.getDurationInSeconds()){
1110 timeline.setDurationInSeconds(audioTrack->getDuration());
1111 }
1112
1113 if(durationLabel->getTextString() != timeline.getDurationInTimecode()){
1114 durationLabel->setTextString(timeline.getDurationInTimecode());
1115 }
1116 }
1117
1118 if(ofGetHeight() < timeline.getDrawRect().getMaxY()){
1119 ofSetWindowShape(ofGetWidth(), timeline.getDrawRect().getMaxY()+30);
1120 }
1121 if(shouldLoadProject){
1122 shouldLoadProject = false;
1123 if(projectToLoad != ""){
1124 loadProject(projectToLoad);
1125 projectToLoad = "";
1126 }
1127 else{
1128 ofFileDialogResult r = ofSystemLoadDialog("Load Project", true);
1129 if(r.bSuccess){
1130 loadProject(r.getPath(), r.getName());
1131 }
1132 }
1133 }
1134
1135 if(shouldCreateNewProject){
1136 shouldCreateNewProject = false;
1137 if(newProjectPath != ""){
1138 newProject(newProjectPath);
1139 newProjectPath = "";
1140 }
1141 else{
1142 ofFileDialogResult r = ofSystemSaveDialog("New Project", "NewDuration");
1143 if(r.bSuccess){
1144 newProject(r.getPath(), r.getName());
1145 }
1146 }
1147 }
1148
1149 if(receivedPaletteToLoad){
1150 receivedPaletteToLoad = false;

Callers

nothing calls this directly

Calls 4

getModifiedMethod · 0.80
getGuiMethod · 0.80
getShouldDeleteMethod · 0.80
getTrackTypeMethod · 0.80

Tested by

no test coverage detected