|
@@ -48,6 +48,7 @@ export class game_list extends Component {
|
|
|
if(!err){
|
|
|
let msg:LevelMessage = JSON.parse(data)
|
|
|
this.initGameList(msg)
|
|
|
+ this.initContentPosition()
|
|
|
if(this.m_loading_finish_call!=null){
|
|
|
this.m_loading_finish_call()
|
|
|
}
|
|
@@ -55,6 +56,11 @@ export class game_list extends Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ public initContentPosition() {
|
|
|
+ let content_position_y = (this.node.getComponent(UITransform).height - this.content.getComponent(UITransform).height) / 2
|
|
|
+ this.content.setPosition(this.content.position.x, -content_position_y, 1)
|
|
|
+ }
|
|
|
+
|
|
|
public initGameList(msg:LevelMessage){
|
|
|
this.m_data = msg;
|
|
|
this.lab_cur_select_page.getComponent(Label).string = `${gameManager.getUserData().select_page}/${this.getAllPage()}`
|