mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
88 lines
3.6 KiB
JavaScript
88 lines
3.6 KiB
JavaScript
/****************************************************************************
|
|
Copyright (c) 2008-2010 Ricardo Quesada
|
|
Copyright (c) 2011-2012 cocos2d-x.org
|
|
Copyright (c) 2013-2014 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.
|
|
****************************************************************************/
|
|
|
|
|
|
cc._tmp.PrototypeLabelTTF = function () {
|
|
var _p = cc.LabelTTF.prototype;
|
|
|
|
// Override properties
|
|
cc.defineGetterSetter(_p, "color", _p.getColor, _p.setColor);
|
|
cc.defineGetterSetter(_p, "opacity", _p.getOpacity, _p.setOpacity);
|
|
|
|
// Extended properties
|
|
/** @expose */
|
|
_p.string;
|
|
cc.defineGetterSetter(_p, "string", _p.getString, _p.setString);
|
|
/** @expose */
|
|
_p.textAlign;
|
|
cc.defineGetterSetter(_p, "textAlign", _p.getHorizontalAlignment, _p.setHorizontalAlignment);
|
|
/** @expose */
|
|
_p.verticalAlign;
|
|
cc.defineGetterSetter(_p, "verticalAlign", _p.getVerticalAlignment, _p.setVerticalAlignment);
|
|
/** @expose */
|
|
_p.fontSize;
|
|
cc.defineGetterSetter(_p, "fontSize", _p.getFontSize, _p.setFontSize);
|
|
/** @expose */
|
|
_p.fontName;
|
|
cc.defineGetterSetter(_p, "fontName", _p.getFontName, _p.setFontName);
|
|
/** @expose */
|
|
_p.font;
|
|
cc.defineGetterSetter(_p, "font", _p._getFont, _p._setFont);
|
|
/** @expose */
|
|
_p.boundingSize;
|
|
//cc.defineGetterSetter(_p, "boundingSize", _p.getDimensions, _p.setDimensions);
|
|
/** @expose */
|
|
_p.boundingWidth;
|
|
cc.defineGetterSetter(_p, "boundingWidth", _p._getBoundingWidth, _p._setBoundingWidth);
|
|
/** @expose */
|
|
_p.boundingHeight;
|
|
cc.defineGetterSetter(_p, "boundingHeight", _p._getBoundingHeight, _p._setBoundingHeight);
|
|
/** @expose */
|
|
_p.fillStyle;
|
|
cc.defineGetterSetter(_p, "fillStyle", _p._getFillStyle, _p.setFontFillColor);
|
|
/** @expose */
|
|
_p.strokeStyle;
|
|
cc.defineGetterSetter(_p, "strokeStyle", _p._getStrokeStyle, _p._setStrokeStyle);
|
|
/** @expose */
|
|
_p.lineWidth;
|
|
cc.defineGetterSetter(_p, "lineWidth", _p._getLineWidth, _p._setLineWidth);
|
|
/** @expose */
|
|
_p.shadowOffset;
|
|
//cc.defineGetterSetter(_p, "shadowOffset", _p._getShadowOffset, _p._setShadowOffset);
|
|
/** @expose */
|
|
_p.shadowOffsetX;
|
|
cc.defineGetterSetter(_p, "shadowOffsetX", _p._getShadowOffsetX, _p._setShadowOffsetX);
|
|
/** @expose */
|
|
_p.shadowOffsetY;
|
|
cc.defineGetterSetter(_p, "shadowOffsetY", _p._getShadowOffsetY, _p._setShadowOffsetY);
|
|
/** @expose */
|
|
_p.shadowOpacity;
|
|
cc.defineGetterSetter(_p, "shadowOpacity", _p._getShadowOpacity, _p._setShadowOpacity);
|
|
/** @expose */
|
|
_p.shadowBlur;
|
|
cc.defineGetterSetter(_p, "shadowBlur", _p._getShadowBlur, _p._setShadowBlur);
|
|
|
|
}; |