void cxActionReadAttr(cxReaderAttrInfo *info) { cxAction this = info->object; // cxActionSetStepHide(this, cxXMLReadBoolAttr(info, "cxAction.stepHide", this->stepHide)); //delay cxActionSetDelay(this, cxXMLReadFloatAttr(info, "cxAction.delay", this->delay)); //time cxActionSetDuration(this, cxXMLReadFloatAttr(info, "cxAction.time", this->duration)); //init time cxActionSetDurationInit(this, cxXMLReadFloatAttr(info, "cxAction.initTime", this->durationInit)); //curve cxConstChars scurve = cxXMLAttr(info->reader, "cxAction.curve"); cxCurveItem curve = cxCurveGet(scurve); if(curve != NULL){ CX_METHOD_OVERRIDE(this->Curve, curve->func); } // cxActionSetSplit(this, cxXMLReadIntAttr(info, "cxAction.split", this->split)); // cxActionSetSpeed(this, cxXMLReadFloatAttr(info, "cxAction.speed", this->speed)); //actionId cxActionSetId(this, cxXMLReadIntAttr(info, "cxAction.id", this->actionId)); //forever if(cxXMLReadBoolAttr(info, "cxAction.forever", false)){ CX_METHOD_OVERRIDE(this->Exit, cxActionForever); } //assist this->assist = cxXMLReadAssist4fAttr(info, "cxAction.assist", this->assist); //event cxXMLAppendEvent(info, this, cxAction, onStart); cxXMLAppendEvent(info, this, cxAction, onStop); cxXMLAppendEvent(info, this, cxAction, onSplit); cxXMLAppendEvent(info, this, cxAction, onStep); }
void cxActionRootReadAttr(cxReaderAttrInfo *info) { cxObjectReadAttr(info); cxActionRoot this = info->root; cxXMLAppendEvent(info, this, cxViewRoot, onBegin); cxXMLAppendEvent(info, this, cxViewRoot, onEnd); }
void cxClippingReadAttr(cxReaderAttrInfo *info) { cxViewReadAttr(info); cxClipping this = info->object; cxClippingSetInverse(this, cxXMLReadBoolAttr(info, "cxClipping.inverse", this->inverse)); cxXMLAppendEvent(info, this, cxClipping, onClipping); }
static cxBool cxTimerXMLReadAttr(cxAny xmlAction,cxAny mAction, xmlTextReaderPtr reader) { cxActionXMLReadAttr(xmlAction, mAction, reader); cxActionXML xml = xmlAction; cxTimer this = mAction; this->repeat = cxXMLReadIntAttr(reader, "cxTimer.repeat", this->repeat); cxXMLAppendEvent(xml->events, this, cxTimer, onArrive); return true; }
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); }