Skip to content

Commit

Permalink
FlxBitmapText: fix computeTextSize() with borders (#2151)
Browse files Browse the repository at this point in the history
Accounts for borderSize to prevent the borders being cut off by clipping.
  • Loading branch information
6J7KZg2f authored and Gama11 committed May 22, 2018
1 parent acc846d commit d89c408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flixel/text/FlxBitmapText.hx
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ class FlxBitmapText extends FlxSprite
*/
function computeTextSize():Void
{
var txtWidth:Int = textWidth;
var txtHeight:Int = textHeight + 2 * padding;
var txtWidth:Int = textWidth + Std.int(borderSize) * 2;
var txtHeight:Int = textHeight + 2 * padding + Std.int(borderSize) * 2;

if (autoSize)
{
Expand Down

0 comments on commit d89c408

Please sign in to comment.