ZFFramework
 
Loading...
Searching...
No Matches
ZFAni.h File Reference

animation util based on timer More...

#include "ZFAniForTimer.h"

Go to the source code of this file.

Classes

class  ZFAniForImpl
 util for custom ani More...
 
class  ZFAniForGeneric
 util for ZFAni More...
 

Functions

zfautoT< ZFAniForTimerZFAni (const ZFListener &aniImpl)
 util to start a ZFAniForTimer based animation quickly
 
zfautoT< ZFAniForTimerZFAni (const zfstring &propertyName, ZFObject *from, ZFObject *to)
 util to start property animation based on ZFAniForTimer
 

Detailed Description

animation util based on timer

Function Documentation

◆ ZFAni() [1/2]

zfautoT< ZFAniForTimer > ZFAni ( const ZFListener & aniImpl)
extern

util to start a ZFAniForTimer based animation quickly

usage:

ZFLISTENER(aniImpl) {
ZFAnimation *ani = zfargs.sender();
zffloat progress = zfargs.param0().to<v_zffloat *>()->zfv;
yourAniImpl(progress, ani);
ZFAni(aniImpl)->target(target)->start();
zfautoT< ZFAniForTimer > ZFAni(const ZFListener &aniImpl)
util to start a ZFAniForTimer based animation quickly
_zft_zffloat zffloat
same as float, see zfindex
Definition ZFCoreTypeDef_CoreType.h:183
#define ZFLISTENER(name)
util to declare a ZFListener locally
Definition ZFListenerDeclare.h:53
#define ZFLISTENER_END()
see ZFLISTENER
Definition ZFListenerDeclare.h:17
base class of all animation
Definition ZFAnimation.h:22
type wrapper for ZFTypeId::Value
Definition ZFTypeId_CoreType.h:316

aniImpl's param0 is v_zffloat that holds progress

◆ ZFAni() [2/2]

zfautoT< ZFAniForTimer > ZFAni ( const zfstring & propertyName,
ZFObject * from,
ZFObject * to )
extern

util to start property animation based on ZFAniForTimer

usage:

ZFAni("yourProp", from, to)->target(target)->start();