@Meir_yanovich wrote:
I have sprite which i upscale it by 6 , this sprite have LabelTTF as child which get upscaled also
can i prevent the font to be upscaled ?
it looks like this :and the simple code here it is in js but it can be in c++ no problem :
var Player = cc.Sprite.extend({ ctor: function(state){ this.setState(state); this._super(); }, onEnter:function () { this._super(); var center = new cc.LabelTTF("Testing A8 Format", "Arial",10); center.x = this.getContentSize().width / 2; center.y = 0; this.addChild(center); }, setState:function(state) { this.state = state; }, }); Player.initSpriteFrame = function (frameName,states) { var player = new Player(states); player.initWithSpriteFrame(frameName); player.getTexture().setTexParameters(gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE); player.setScale(6); return player; };
Posts: 2
Participants: 2