예제 #1
0
void FTimeline::SetTimelineLength(float NewLength)
{
	Length = NewLength;
	if(Position > NewLength)
	{
		SetNewTime(NewLength-KINDA_SMALL_NUMBER);
	}
}
예제 #2
0
void AmEventTimeView::ObserverMessageReceived(BMessage* msg)
{
	int32		change;
	msg->FindInt32(B_OBSERVE_WHAT_CHANGE, &change);
	if (change == ARPMSG_INT_CONTROL_CHANGED) {
		if ( ConstructSignatureFromControls() == B_OK ) {
			if ( (mBeatCtrl == 0) || (mClockCtrl == 0) ) return;
			AmTime	time = mSignature->StartTime();
			time += ( (mBeatCtrl->Value() - 1) * mSignature->TicksPerBeat() );
			time += mClockCtrl->Value();
			SetNewTime(time);
		}
	} else if (change == ARPMSG_TIME_VIEW_CHANGED) {
		// Just force a redisplay
		SetEvent( mContainer, mEvent );
	}
}