diff --git a/flixel/text/FlxText.hx b/flixel/text/FlxText.hx index a3c65f81ca..b9f8d2a1d4 100644 --- a/flixel/text/FlxText.hx +++ b/flixel/text/FlxText.hx @@ -1,5 +1,6 @@ package flixel.text; +import openfl.Assets; import openfl.display.BitmapData; import openfl.geom.ColorTransform; import openfl.text.TextField; @@ -14,11 +15,11 @@ import flixel.graphics.atlas.FlxNode; import flixel.graphics.frames.FlxFramesCollection; import flixel.math.FlxMath; import flixel.math.FlxPoint; +import flixel.math.FlxRect; import flixel.system.FlxAssets; import flixel.util.FlxColor; import flixel.util.FlxDestroyUtil; import flixel.util.helpers.FlxRange; -import openfl.Assets; using flixel.util.FlxStringUtil; using flixel.util.FlxUnicodeUtil; @@ -537,6 +538,12 @@ class FlxText extends FlxSprite super.updateHitbox(); } + override function getScreenBounds(?newRect:FlxRect, ?camera:FlxCamera):FlxRect + { + regenGraphic(); + return super.getScreenBounds(newRect, camera); + } + function set_fieldWidth(value:Float):Float { if (textField == null)