|
@@ -29,7 +29,8 @@ export class home_guangbo extends Component {
|
|
|
this.cur_index = 0
|
|
|
}
|
|
|
let cur_content = this.data_list[this.cur_index].title
|
|
|
- cur_content = '<b>' + cur_content + '</b>' // 加粗
|
|
|
+ // cur_content = '<b>' + cur_content + '</b>' // 加粗(<b><\b>)CHAR模式,无效
|
|
|
+ // console.log('cur_content=',cur_content)
|
|
|
this.setLabContent(cur_content)
|
|
|
let cur_content_width = this.lab_content.getComponent(UITransform).contentSize.width
|
|
|
// console.log('cur_content_width=',cur_content_width)
|
|
@@ -47,7 +48,7 @@ export class home_guangbo extends Component {
|
|
|
let cur_content_width = this.computeLabelTextWidth(cur_content,lab_component.fontSize,lab_component.lineHeight)
|
|
|
// console.log('cur_content_width=',cur_content_width)
|
|
|
let cur_content_height = this.lab_content.getComponent(UITransform).contentSize.height
|
|
|
- this.lab_content.getComponent(UITransform).setContentSize(new Size(cur_content_width,cur_content_height))
|
|
|
+ this.lab_content.getComponent(UITransform).setContentSize(new Size(cur_content_width,cur_content_height))
|
|
|
this.lab_content.setPosition(this.screen_width/2+this.left_padding,this.lab_content.getPosition().y,0)
|
|
|
this.runContent(cur_content_width)
|
|
|
}
|