示例#1
0
static void cxLoadingArrive(cxEvent *event)
{
    cxLoading this = cxActionView(event->sender);
    CX_EVENT_FIRE(this, onLoading);
    cxTimer timer = cxViewAppendTimer(this, 1.0f, 1);
    CX_EVENT_QUICK(timer->onArrive, cxFinishedArrive);
}
示例#2
0
CX_OBJECT_INIT(cxTextureFactory, cxObject)
{
    cxEngine engine = cxEngineInstance();
    this->caches = CX_ALLOC(cxHash);
    
    CX_SLOT_CONNECT(engine->onMemory, this, onMemory, cxTextureFactoryMemory);
    CX_EVENT_QUICK(engine->onFree, cxTextureFactoryDestroy);
}
示例#3
0
CX_OBJECT_INIT(cxSprite, cxView)
{
    this->texCoord = cxBoxTex2fDefault();
    cxSpriteSetBlendFactor(this, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    CX_EVENT_QUICK(this->super.onDirty, cxSpriteDirtyEvent);
    CX_METHOD_OVERRIDE(this->super.Draw, cxSpriteDraw);
    cxSpriteSetShader(this, cxShaderDefaultKey);
    cxObjectSetReadAttrFunc(this, cxSpriteReadAttr);
}
示例#4
0
CX_OBJECT_INIT(cxLoading, cxView)
{
    this->isLoading = false;
    CX_EVENT_QUICK(this->super.onUpdate, cxLoadingOnUpdate);
    CX_METHOD_OVERRIDE(this->super.Touch, cxLoadingTouch);
}
示例#5
0
void cxViewOnUpdate(cxAny pview,cxEventFunc func)
{
    cxView this = pview;
    CX_EVENT_QUICK(this->onUpdate, func);
}