add update PlaceholderText for EditBoxImpl (#2843)

This commit is contained in:
Knox
2018-06-11 17:41:24 +08:00
committed by pandamicro
parent 480903d983
commit b57ab464f2
2 changed files with 10 additions and 0 deletions
@@ -198,6 +198,7 @@ let EditBox = cc.Class({
default: 'Enter text here...',
notify () {
this._placeholderLabel.string = this.placeholder;
this._impl.setPlaceholderText(this.placeholder);
}
},
@@ -339,6 +340,7 @@ let EditBox = cc.Class({
impl.setTabIndex(this.tabIndex);
impl.setFontColor(this.fontColor);
impl.setFontSize(this.fontSize);
impl.setPlaceholderText(this.placeholder);
impl.setDelegate(this);
@@ -146,6 +146,14 @@ let EditBoxImpl = cc.Class({
return this._text;
},
setPlaceholderText (text) {
this._placeholderText = text;
},
getPlaceholderText () {
return this._placeholderText;
},
setDelegate (delegate) {
this._delegate = delegate;
},