|
@@ -108,9 +108,6 @@ export class attributes_count_down extends Component {
|
|
}
|
|
}
|
|
public update_att(data:att_count_down){
|
|
public update_att(data:att_count_down){
|
|
this.m_data = data;
|
|
this.m_data = data;
|
|
- console.log(' this.m_data.time_count=', this.m_data.time_count)
|
|
|
|
- console.log(' this.m_data.font_info.font_size=', this.m_data.font_info.font_size)
|
|
|
|
-
|
|
|
|
this.ProgressBar_Bg.getComponent(question_btn_info).initView(this.m_data.ProgressBar_Bg,1,null,config.attributes_list_type.count_down)
|
|
this.ProgressBar_Bg.getComponent(question_btn_info).initView(this.m_data.ProgressBar_Bg,1,null,config.attributes_list_type.count_down)
|
|
this.ProgressBar_Bar.getComponent(question_btn_info).initView(this.m_data.ProgressBar_Bar,2,null,config.attributes_list_type.count_down)
|
|
this.ProgressBar_Bar.getComponent(question_btn_info).initView(this.m_data.ProgressBar_Bar,2,null,config.attributes_list_type.count_down)
|
|
this.img_text.getComponent(question_btn_info).initView(this.m_data.img_text,3,null,config.attributes_list_type.count_down)
|
|
this.img_text.getComponent(question_btn_info).initView(this.m_data.img_text,3,null,config.attributes_list_type.count_down)
|
|
@@ -120,16 +117,12 @@ export class attributes_count_down extends Component {
|
|
this.lab_fail_event.getComponent(Label).string = this.m_data.fail_event_id!=-1?`绑定的id${this.m_data.fail_event_id}`:"无"
|
|
this.lab_fail_event.getComponent(Label).string = this.m_data.fail_event_id!=-1?`绑定的id${this.m_data.fail_event_id}`:"无"
|
|
this.lab_start_event.getComponent(Label).string = this.m_data.start_event_id!=-1?`绑定的id${this.m_data.start_event_id}`:"无"
|
|
this.lab_start_event.getComponent(Label).string = this.m_data.start_event_id!=-1?`绑定的id${this.m_data.start_event_id}`:"无"
|
|
if(this.m_data.font_info!=undefined&&this.m_data.font_info!=null){
|
|
if(this.m_data.font_info!=undefined&&this.m_data.font_info!=null){
|
|
- if(this.m_data.font_info.font_size==undefined||
|
|
|
|
- this.m_data.font_info.font_size==null||
|
|
|
|
- isNaN(this.m_data.font_info.font_size)) {
|
|
|
|
- this.m_data.font_info.font_size = 20
|
|
|
|
- } else {
|
|
|
|
- this.m_data.font_info.font_size = parseInt(this.font_size.getComponent(EditBox).string)
|
|
|
|
- }
|
|
|
|
let color = this.m_data.font_info.font_color;
|
|
let color = this.m_data.font_info.font_color;
|
|
this.font_color.getComponent(Sprite).color = new Color(color.r,color.g,color.b);
|
|
this.font_color.getComponent(Sprite).color = new Color(color.r,color.g,color.b);
|
|
- this.font_size.getComponent(EditBox).string = this.m_data.font_info.font_size.toString()
|
|
|
|
|
|
+ let font_size_string = this.m_data.font_info.font_size.toString()
|
|
|
|
+ if(font_size_string.length > 0) {
|
|
|
|
+ this.font_size.getComponent(EditBox).string = font_size_string
|
|
|
|
+ }
|
|
}else{
|
|
}else{
|
|
this.m_data.font_info = new font_info;
|
|
this.m_data.font_info = new font_info;
|
|
}
|
|
}
|
|
@@ -139,18 +132,14 @@ export class attributes_count_down extends Component {
|
|
change(){
|
|
change(){
|
|
this.m_data.is_show_time = this.toggle_enbale_time.getComponent(Toggle).isChecked ;
|
|
this.m_data.is_show_time = this.toggle_enbale_time.getComponent(Toggle).isChecked ;
|
|
let down_count_time = this.edit_down_count_time.getComponent(EditBox).string
|
|
let down_count_time = this.edit_down_count_time.getComponent(EditBox).string
|
|
- if(this.m_data.font_info!=undefined&&this.m_data.font_info!=null){
|
|
|
|
- if(this.m_data.font_info.font_size==undefined||
|
|
|
|
- this.m_data.font_info.font_size==null||
|
|
|
|
- isNaN(this.m_data.font_info.font_size)) {
|
|
|
|
- this.m_data.font_info.font_size = 20
|
|
|
|
- } else {
|
|
|
|
- this.m_data.font_info.font_size = parseInt(this.font_size.getComponent(EditBox).string)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
if(down_count_time.length>0) {
|
|
if(down_count_time.length>0) {
|
|
this.m_data.time_count = parseInt(down_count_time);
|
|
this.m_data.time_count = parseInt(down_count_time);
|
|
}
|
|
}
|
|
|
|
+ let font_size = this.font_size.getComponent(EditBox).string
|
|
|
|
+ if(font_size.length>0) {
|
|
|
|
+ this.m_data.font_info.font_size = parseInt(font_size)
|
|
|
|
+ }
|
|
|
|
+
|
|
if(this.call_back!=null){
|
|
if(this.call_back!=null){
|
|
this.call_back(this.m_data)
|
|
this.call_back(this.m_data)
|
|
}
|
|
}
|