mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
The BitmapText.setFont
method will now set the texture, size and alignment even if the same font key has been given as is already in use. Fix #6740
This commit is contained in:
parent
76903fcdb9
commit
a9012b19b4
1 changed files with 11 additions and 14 deletions
|
@ -783,7 +783,7 @@ var BitmapText = new Class({
|
|||
/**
|
||||
* Changes the font this BitmapText is using to render.
|
||||
*
|
||||
* The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved,
|
||||
* The new texture is loaded and applied to the BitmapText. The existing text, size and alignment are preserved,
|
||||
* unless overridden via the arguments.
|
||||
*
|
||||
* @method Phaser.GameObjects.BitmapText#setFont
|
||||
|
@ -800,8 +800,6 @@ var BitmapText = new Class({
|
|||
if (size === undefined) { size = this._fontSize; }
|
||||
if (align === undefined) { align = this._align; }
|
||||
|
||||
if (key !== this.font)
|
||||
{
|
||||
var entry = this.scene.sys.cache.bitmapFont.get(key);
|
||||
|
||||
if (entry)
|
||||
|
@ -816,7 +814,6 @@ var BitmapText = new Class({
|
|||
|
||||
GetBitmapTextSize(this, false, true, this._bounds);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue