Пример #1
0
//--------------------------------------------------------------
void AnimationManager::M_readSettings(ofxXmlSettings& settings)
{
	OFAPPLOG->begin("AnimationManager::M_readSettings");

    settings.pushTag("surface");
    settings.pushTag("timeline");
    
    
    int nbAnimations = settings.getNumTags("animation");
    OFAPPLOG->println("nbAnimations="+ofToString(nbAnimations));
    for (int i=0;i<nbAnimations;i++)
    {
        string animName = settings.getValue("animation","",i);
        
        if (animName != "" && M_getAnimationByName(animName) != 0){
		    OFAPPLOG->println(animName);
            m_listAnimationsInfos.push_back( AnimationInfo(animName) );
        }
    }

    settings.popTag();
    settings.popTag();

	OFAPPLOG->end();
}
Пример #2
0
void KonqSidebarTree::startAnimation( KonqSidebarTreeItem * item, const char * iconBaseName, uint iconCount, const QPixmap * originalPixmap )
{
    const QPixmap *pix = originalPixmap ? originalPixmap : item->pixmap(0);
    if (pix)
    {
        m_mapCurrentOpeningFolders.insert( item, AnimationInfo( iconBaseName, iconCount, *pix ) );
        if ( !m_animationTimer->isActive() )
            m_animationTimer->start( 50 );
    }
}
Пример #3
0
	static int createAnimation(entityx::Entity &E, int spriteId, float fps, const Vector &size, const Vector &cellSize, bool running = false) {
		if(!E.has_component<Animation>()) E.assign<Animation>();
		E.component<Animation>()->animations.push_back(AnimationInfo(spriteId, fps, size, cellSize, running));
		return E.component<Animation>()->animations.size() - 1;
	}