mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
5bf14a8f4c
change SpriteFrame to Sprite rename placeHolder to placeholder fix placeholder Revert "change SpriteFrame to Sprite" This reverts commit d968d8ac9a01d91b3055830aab109b934ae27138. fix clear spriteframe fix init size and label font size add line height support
55 lines
2.5 KiB
JavaScript
55 lines
2.5 KiB
JavaScript
/****************************************************************************
|
|
Copyright (c) 2015 Chukong Technologies Inc.
|
|
|
|
http://www.cocos2d-x.org
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
all copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
THE SOFTWARE.
|
|
****************************************************************************/
|
|
|
|
'use strict';
|
|
|
|
var _p = cc.EditBox.prototype;
|
|
cc.defineGetterSetter(_p, 'font', null, _p.setFont);
|
|
cc.defineGetterSetter(_p, 'fontName', null, _p.setFontName);
|
|
cc.defineGetterSetter(_p, 'fontSize', null, _p.setFontSize);
|
|
cc.defineGetterSetter(_p, 'fontColor', null, _p.setFontColor);
|
|
cc.defineGetterSetter(_p, 'string', _p.getString, _p.setString);
|
|
cc.defineGetterSetter(_p, 'maxLength', _p.getMaxLength, _p.setMaxLength);
|
|
cc.defineGetterSetter(_p, 'placeholder', _p.getPlaceHolder, _p.setPlaceHolder);
|
|
cc.defineGetterSetter(_p, 'placeholderFont', null, _p.setPlaceholderFont);
|
|
cc.defineGetterSetter(_p, 'placeholderFontName', null, _p.setPlaceholderFontName);
|
|
cc.defineGetterSetter(_p, 'placeholderFontSize', null, _p.setPlaceholderFontSize);
|
|
cc.defineGetterSetter(_p, 'placeholderFontColor', null, _p.setPlaceholderFontColor);
|
|
cc.defineGetterSetter(_p, 'inputFlag', null, _p.setInputFlag);
|
|
cc.defineGetterSetter(_p, 'delegate', null, _p.setDelegate);
|
|
cc.defineGetterSetter(_p, 'inputMode', null, _p.setInputMode);
|
|
cc.defineGetterSetter(_p, 'returnType', null, _p.setReturnType);
|
|
|
|
|
|
_p.editBoxEditingDidBegin = function (sender) {
|
|
this.editBoxEditingDidBegan(sender);
|
|
}
|
|
_p.editBoxEditingDidEnd = function (sender) {
|
|
this.editBoxEditingDidEnded(sender);
|
|
}
|
|
|
|
_p.setLineHeight = function () {}
|
|
|
|
_p = null;
|