示例#1
0
bool ControlPanel::timeProgressClicked(GdkEventButton* event) {
	if (event->type == GDK_BUTTON_PRESS) {
		if (duration > -1) {
			double pos = (1.0 / duration)
					* (int) ((event->x / (double) timeProgress->get_width()) * duration);
			timeProgress->set_fraction(pos);
			timelineChanged();
		}
	}
	return true;
}
示例#2
0
void ofxTimeline::setupGUI(){
	ofxSimpleGuiPage& page = gui.addPage(name);
	gui.addDebug("timeElapsed", timeElapsed);
	gui.addButton("start", (ofxBaseObject*)this, &ofxBaseObject::_start); 
	gui.addButton("stop", (ofxBaseObject*)this, &ofxBaseObject::_stop);
	gui.addButton("reset", this, &ofxTimeline::reset);
	gui.addButton("timelineChanged", this, &ofxTimeline::timelineChanged);
	gui.addTitle("Events\nPress on [timelineChanged]\nafter changes to event times",50);
	for (vector<ofxTimelineEvent*>::iterator it = events.begin(); it != events.end(); ++it) {
		(*it)->setupGUI(0,maxTime);
	}
	page.loadFromXML();
	timelineChanged();
}
void PropertyTimelineWidget::clearTimeline() {
    propertyTimeline_->resetTimeline();
    timelineChange_ = true;
    timelineChanged();
}
示例#4
0
void ofxTimeline::timelineChanged(ofEventArgs& e){
	timelineChanged();
}
示例#5
0
ofxTimelineEvent& ofxTimeline::addEvent(ofxTimelineEvent& event){
	events.push_back(&event);
	timelineChanged();
	return event;
}