請問Editnox如何輸入位置置中,設定字體

thank you so much

:cry::cry::cry:

help me plz :cry:

These features are missing ATM, sorry.

oh… what can i do…:sob:

no any ways to add these functions??? :sob:

please help me:cry:

plzzzzzzz :sob:

ok, I know how to do now, i used funny way to do text center and set font style.
the idea is


<img src="/uploads/default/original/2X/4/4193a903e37dfb441b24fc05287e9bafd2aae820.png" width="690"height=“170”>

add label under the editbox,

the code is

properties: {

 textbox:{
            default: null,
          //  type: cc.EditBox,
            type: cc.EditBox
       },

  nameLabel:{
           
          default:null,
          type: cc.Label
      },
       

}
 onLoad: function () {

  
         var color = new cc.Color();
        this.textbox.fontColor = color.setA(0);

 this.textbox.node.on('text-changed',this.editcallback,this);
        
         this.textbox.node.on('editing-return',this.editcallend,this);
         
         this.textbox.node.on('editing-did-began',this.beginedit,this);
    },
  callback: function (event) {
          
  this.textbox.string = "";
  this.nameLabel.string='';
    
   
    
    
    },
    
    editcallback: function(event){
        
         UserData.name = this.textbox.string;
         
         this.nameLabel.string = this.textbox.string;
    
    cc.sys.localStorage.setItem('userData', JSON.stringify(UserData));
    

        
    },
    
    editcallend:function(event){
        var color = new cc.Color();
        this.textbox.fontColor = color.setA(0);
        this.nameLabel.string = UserData.name;
    },
    
    beginedit:function(event){
        
         var color = new cc.Color();
         var color2 = new cc.Color();
         this.textbox.fontColor = color.setA(0);
        this.textbox.string = '';
        this.nameLabel.string = '';
        
        this.textbox.placeholderFontColor = color2.setA(0);
        
        
    }
    

});

In the end, I very hopefully cocos creator edit box add these features, since it is very common. thank you very much

2赞