Ejemplo n.º 1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void FrameAnimationControl::setDefault()
{
    setCurrentFrame(0);
    setNumFrames(0);
    setTimeout(TIMEOUT_DEFAULT);
    setForward(true);
    setRepeatFromStart(false);
    setRepeatFwdBwd(false);
    //    m_lastTimeStamp = 0;
}
Ejemplo n.º 2
0
void MainVerticalSlider::setImage(String imagePath, int numFrames){
    if (image != nullptr){ 
        delete image;
        image = nullptr;
    }
    
    File imageFile(File(File::getCurrentWorkingDirectory().getFullPathName() + "/" + imagePath));
    PNGImageFormat p;
    image = new Image(PNGImageFormat::loadFrom(*imageFile.createInputStream()));
    setNumFrames(numFrames);
}
Ejemplo n.º 3
0
void SpriteAnimator::playAnimation(int line, int numFrames, float frameDuration, int numLoops)
{
	setLine(line);
	setColumn(0);
	FLAT_ASSERT(numFrames <= getAtlasWidth());
	setNumFrames(numFrames);
	setFrameDuration(frameDuration);
	setNumLoops(numLoops);
	setAnimated(true);
	m_animationStarted = false;
}
Ejemplo n.º 4
0
Animation::Animation(float frameRate, int numFrames) : active(false), frame(0)
{
	setFrameRate(frameRate);
	setNumFrames(numFrames);
}
Ejemplo n.º 5
0
void InsertFramesBox::OnEnChangeInsertnumframes() {
	UpdateData(true);
	setNumFrames(mNumFrames);
}
Ejemplo n.º 6
0
void InsertFramesBox::setNumSeconds(double numSeconds) {
	setNumFrames(FRAMES_PER_SECOND * numSeconds);
}
Ejemplo n.º 7
0
void BufferRecorderNode::setNumSeconds( double numSeconds, bool shrinkToFit )
{
	setNumFrames( size_t( numSeconds * (double)getSampleRate() ), shrinkToFit );
}