!function(){window.QyText=QyObject.extend({ctor:function(t){t||(t={});t.anchorPoint={x:0,y:0};this._super(t);var e="zh-CN",i=t.font||{},r=void 0===t.text[e]?"":t.text[e];this.currentSprite=new cc.LabelTTF(r,i.fontFamily||"Arial",i.fontSize,t.size,cc["TEXT_ALIGNMENT_"+i.align.toUpperCase()]);this.currentSprite.setAnchorPoint(t.anchorPoint.x,1-t.anchorPoint.y);this.currentSprite.qyobj=this;this.setFontColor(i.fontColor);t.position&&this.currentSprite.setPosition(t.position.x,qyengine.winSize.height-t.position.y);var o=t.position;this.origSize=t.size;t.position=o;t.hiddenAtStart&&this.hide()}})}();QyText.prototype.setText=function(t){return this.currentSprite&&this.currentSprite.setString(t)};QyText.prototype.getText=function(){return this.currentSprite&&this.currentSprite.getString()};QyText.prototype.addText=function(t){this.setText(this.getText()+""+t)};QyText.prototype.setFontColor=function(t){this.currentSprite&&this.currentSprite.setColor(cc.hexToColor(t))};QyText.prototype.setFontSize=function(t){this.currentSprite&&this.currentSprite.setFontSize(t)};