Exemplo n.º 1
0
void cxActionRootReadAttr(cxReaderAttrInfo *info)
{
    cxObjectReadAttr(info);
    cxActionRoot this = info->root;
    cxXMLAppendEvent(info, this, cxViewRoot, onBegin);
    cxXMLAppendEvent(info, this, cxViewRoot, onEnd);
}
Exemplo n.º 2
0
void cxViewReadAttr(cxReaderAttrInfo *info)
{
    cxObjectReadAttr(info);
    cxView this = info->object;
    //fixscale
    cxViewSetFixScale(this, cxXMLReadVec2fAttr(info, "cxView.fixScale", this->fixscale));
    //rect
    cxViewRootReadRectToView(info);
    //resize
    cxViewRootReadAutoResize(info);
    //cropping
    cxViewSetCropping(this,cxXMLReadBoolAttr(info, "cxView.cropping", this->isCropping));
    //top
    cxViewSetTop(this, cxXMLReadBoolAttr(info, "cxView.hideTop", this->hideTop));
    //anchor
    cxViewSetAnchor(this, cxXMLReadVec2fAttr(info, "cxView.anchor", this->anchor));
    //scale
    cxViewSetScale(this, cxXMLReadVec2fAttr(info, "cxView.scale", this->scale));
    //color
    cxColor4f color = cxXMLReadColor4fAttr(info, "cxView.color", this->color);
    cxViewSetColor(this, cxColor3fv(color.r, color.g, color.b));
    cxViewSetAlpha(this, cxXMLReadFloatAttr(info, "cxView.alpha", color.a));
    //visible
    cxViewSetVisible(this, cxXMLReadBoolAttr(info, "cxView.visible", this->isVisible));
    //debug border
    cxViewSetBorder(this, cxXMLReadBoolAttr(info, "cxView.border", this->isBorder));
    //rotate raxis
    cxViewSetRaxis(this, cxXMLReadVec3fAttr(info, "cxView.raxis", this->raxis));
    //rotate angle
    cxViewSetAngle(this, cxXMLReadFloatAttr(info, "cxView.angle", this->angle));
    //rotate degress
    cxViewSetDegrees(this, cxXMLReadFloatAttr(info, "cxView.degrees", kmRadiansToDegrees(this->angle)));
    //Chipmunk support
    cxViewCheckChipmunkSupport(info);
    //cxAtlas support
    this->supportAtlasSet = cxXMLReadBoolAttr(info, "cxAtlasSet.support", false);
    //view event
    cxXMLAppendEvent(info, this, cxView, onEnter);
    cxXMLAppendEvent(info, this, cxView, onExit);
    cxXMLAppendEvent(info, this, cxView, onUpdate);
    cxXMLAppendEvent(info, this, cxView, onResize);
    cxXMLAppendEvent(info, this, cxView, onLayout);
    cxXMLAppendEvent(info, this, cxView, onDirty);
}