|
@@ -114,21 +114,21 @@ export class game_list extends Component {
|
|
let n_p = this.content.parent.getComponent(UITransform).convertToNodeSpaceAR(p)
|
|
let n_p = this.content.parent.getComponent(UITransform).convertToNodeSpaceAR(p)
|
|
let pos = this.content.parent.getComponent(UITransform).convertToWorldSpaceAR(this.content.position)
|
|
let pos = this.content.parent.getComponent(UITransform).convertToWorldSpaceAR(this.content.position)
|
|
if(this.x_len==0){
|
|
if(this.x_len==0){
|
|
- this.x_len = (et.getUILocation().x - pos.x)*2;
|
|
|
|
|
|
+ this.x_len = (et.getUILocation().x - pos.x)*1;
|
|
}
|
|
}
|
|
this.content.position = new Vec3(n_p.x-this.x_len ,this.content.position.y);
|
|
this.content.position = new Vec3(n_p.x-this.x_len ,this.content.position.y);
|
|
})
|
|
})
|
|
this.content.on(Node.EventType.TOUCH_END,()=>{
|
|
this.content.on(Node.EventType.TOUCH_END,()=>{
|
|
- if(this.onClickItem) { return }
|
|
|
|
this.x_len = 0
|
|
this.x_len = 0
|
|
|
|
+ if(this.onClickItem) { return }
|
|
this.touchContentScroll()
|
|
this.touchContentScroll()
|
|
- this.content.position = new Vec3(0,this.content.position.y)
|
|
|
|
|
|
+ this.content.position = new Vec3(-19,this.content.position.y)
|
|
})
|
|
})
|
|
this.content.on(Node.EventType.TOUCH_CANCEL,()=>{
|
|
this.content.on(Node.EventType.TOUCH_CANCEL,()=>{
|
|
- if(this.onClickItem) { return }
|
|
|
|
this.x_len = 0
|
|
this.x_len = 0
|
|
|
|
+ if(this.onClickItem) { return }
|
|
this.touchContentScroll()
|
|
this.touchContentScroll()
|
|
- this.content.position = new Vec3(0,this.content.position.y)
|
|
|
|
|
|
+ this.content.position = new Vec3(-19,this.content.position.y)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|