void CFlashUIMCPosRotScaleBaseNode::SetValues( IUIElement* pElement, const Vec3 &vPos, const Vec3 &vRot, const Vec3 &vScale ) { IFlashVariableObject* pMc = pElement->GetMovieClip( GetObjectDesc(), GetTmplDesc()); if (pMc) { SFlashDisplayInfo info; pMc->GetDisplayInfo(info); info.SetX( vPos.x ); info.SetY( vPos.y ); info.SetZ( vPos.z ); info.SetRotation( vRot.z ); info.SetXRotation( vRot.x ); info.SetYRotation( vRot.y ); info.SetXScale( vScale.x * 100.f ); info.SetYScale( vScale.y * 100.f ); info.SetZScale( vScale.z * 100.f ); pMc->SetDisplayInfo( info ); } }
//------------------------------------------------------------------------ int CScriptBind_UIAction::SetScale( IFunctionHandler *pH, const char * elementName, int instanceID, const char * mcName, Vec3 vScale ) { IUIElement* pElement = GetElement( elementName, instanceID ); if ( pElement ) { IFlashVariableObject* pMC = pElement->GetMovieClip( mcName ); if ( pMC ) { SFlashDisplayInfo info; pMC->GetDisplayInfo( info ); info.SetXScale( vScale.x ); info.SetYScale( vScale.y ); info.SetZScale( vScale.z ); pMC->SetDisplayInfo( info ); return pH->EndFunction( true ); } UIACTION_WARNING( "LUA: Element %s has no movieclip %s", elementName, mcName ); } else { UIACTION_WARNING( "LUA: UIElement %s does not exist", elementName ); } return pH->EndFunction( false ); }