Exemplo n.º 1
0
CX_OBJECT_INIT(cxClipping, cxView)
{
    this->useRef = cxStencilRefAlloc();
    cxObjectSetReadAttrFunc(this, cxClippingReadAttr);
    CX_METHOD_OVERRIDE(this->super.Before, cxClippingDrawBefore);
    CX_METHOD_OVERRIDE(this->super.After, cxClippingDrawAfter);
}
Exemplo n.º 2
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);
}
Exemplo n.º 3
0
CX_OBJECT_INIT(cxAction, cxObject)
{
    this->super.cxBase = cxBaseTypeAction;
    cxObjectSetReadAttrFunc(this, cxActionReadAttr);
    this->isExit = false;
    this->speed = 1.0f;
    this->index = -1;
    this->split = -1;
}
Exemplo n.º 4
0
CX_OBJECT_INIT(cxView, cxObject)
{
    this->super.cxBase = cxBaseTypeView;
    this->hideTop = true;
    this->isBorder = false;
    this->isVisible = true;
    this->isDirty = true;
    this->color = cxColor4fv(1.0f, 1.0f, 1.0f, 1.0f);
    this->size = cxSize2fv(0.0f, 0.0f);
    this->anchor = cxVec2fv(0.5f, 0.5f);
    this->raxis = cxVec3fv(0.0f, 0.0f, 1.0f);
    this->scale = cxVec2fv(1.0f, 1.0f);
    this->fixscale = cxVec2fv(1.0f, 1.0f);
    this->subViews = CX_ALLOC(cxList);
    CX_METHOD_OVERRIDE(this->IsTouch, cxViewIsTouch);
    CX_METHOD_OVERRIDE(this->IsOnKey, cxViewIsOnKey);
    cxObjectSetReadAttrFunc(this, cxViewReadAttr);
    
    this->actions = CX_ALLOC(cxHash);
    this->caches = CX_ALLOC(cxHash);
    this->removes = CX_ALLOC(cxArray);
}
Exemplo n.º 5
0
CX_OBJECT_INIT(cxTint, cxAction)
{
    cxObjectSetReadAttrFunc(this, cxTintReadAttr);
    CX_METHOD_OVERRIDE(this->super.Init, cxTintInit);
    CX_METHOD_OVERRIDE(this->super.Step, cxTintStep);
}
Exemplo n.º 6
0
CX_OBJECT_INIT(cxActionRoot, cxObject)
{
    cxObjectSetReadAttrFunc(this, cxActionRootReadAttr);
    this->codes = CX_ALLOC(cxHash);
    CX_METHOD_OVERRIDE(this->Make, cxActionRootMakeElement);
}