There's not a malfunction at all, it's just a lack of features...
You could drastically improve that class, adding a few booleans
Anyway, the point is to reflect as much as possible the native TextField functionality.
This is the API of my class BText (Genome2D), I know that Starling works differently that G2D, but maybe u could find it useful:
::wordWrap (only if multiline==true)
do Starlin's implementation (cut the exceeded chars based on a space/tab, and add them at a new line)
Do the same as true, except that don't create a new line, new line is created when a RETURN char is found.
Solves your issue with the current starling implementation, if "false" when the char exceeds the width, break the "generation" execution. (return)
::autoSize (only if multiline==false)
Reflects TextField's autoSize=TextFielfAutoSize.LEFT
Do nothing... text is cropped by width, and execution of code stops.
Same as Starling's autoScale. with the exception of the multiline flag mentioned in the earlier post.
Do nothing... only 1 while() loop
::autoSizeToFitReductionRatio (only when autoFitSize==true)
a Number to define how many "points" to reduce the text on each loop.
[code]size-=autoSizeToFitReductionRatio[code], if u decrease this number, u'll get more precision when the text is reduced, at the cost of more loop cycles
Same as Staring's
Same as Staring's
-- PLUS --
Reflects the real size of the text.
a format Object, to change: font "face" (mapping a different atlas), padding, add underline, etc... using a custom syntax where u only define tags, and set the style in the code.
changes the overall color of the text.
change font size.
changes the lineHeight.
Change the space between letters.
Allows a native implementation for scroll the text (if multiline==true && maxScroll > 1 )
and allows pixel precision scrolling.
Toggles the kerning in the text (if any defined in the fnt file).
This is a special function to directly change a specific range of chars in the text without invalidation of the entire text. Useful for a "console" component when u display a lot of info and only want to change one portion of the text, like a preloading value.
This gives u the ability to offset the chars the text applied (requires invalidation).
I made it for a custom implementation using a hidden native TextField to simulate the scroll functionality http://7interactive.com.ar/labs/genome/?swf=bitmap_fonts_v2