|
@@ -221,17 +221,18 @@ export class widget_base extends Component {
|
|
|
this.bindTarget.opacity = up_frame.transparent;
|
|
|
this.bindTarget.size = new Size(up_frame.size_width,up_frame.size_height)
|
|
|
this.bindTarget.pos = new Vec3(up_frame.pos_x,up_frame.pos_y)
|
|
|
- this.bindTarget.anchorPointX = up_frame.anchor_point_x
|
|
|
- this.bindTarget.anchorPointY = up_frame.anchor_point_y
|
|
|
-
|
|
|
- // anchorPointX:frame.anchor_point_x, anchorPointY:frame.anchor_point_y
|
|
|
- console.log('anchorPointX=',frame.anchor_point_x,'anchorPointY=',frame.anchor_point_y)
|
|
|
+ let anchor_point_x = up_frame.anchor_point_x == undefined?0.5:up_frame.anchor_point_x
|
|
|
+ this.bindTarget.anchorPointX = anchor_point_x
|
|
|
+ let anchor_point_y = up_frame.anchor_point_y == undefined?0.5:up_frame.anchor_point_y
|
|
|
+ this.bindTarget.anchorPointY = anchor_point_y
|
|
|
+
|
|
|
let color_opactiy_tw_size = tween(this.bindTarget)
|
|
|
.to( tweenDuration, { pos:n_pos,color: _color,opacity:frame.transparent,size:new Size(frame.size_width,frame.size_height),rotation:frame.rotation, anchorPointX:frame.anchor_point_x, anchorPointY:frame.anchor_point_y}, {
|
|
|
onUpdate(tar:BindTarget){
|
|
|
self.icon.getComponent(Sprite).color = tar.color;
|
|
|
self.icon.getComponent(UIOpacity).opacity = tar.opacity;
|
|
|
self.icon.getComponent(UITransform).setContentSize(tar.size)
|
|
|
+ // console.log('tar.anchorPointX_Y=',tar.anchorPointX,'-',tar.anchorPointY)
|
|
|
self.icon.getComponent(UITransform).setAnchorPoint(tar.anchorPointX, tar.anchorPointY)
|
|
|
if(self.mCurAnimation.isMove){
|
|
|
self.node.position = tar.pos
|