Closed Dovyski closed 2 years ago
The change looks good (tested and verified).
The only problem is, rather than still be blurry, "justify"
does not work at all. I haven't tested it, but this should be fixable by changing line 266 to the following:
var numTextFields:uint = (this.alignment == "justify") ? 1 : nl;
while (i < numTextFields)
Could you test and add that to the commit?
We can fix the "justify"
blurriness in a future release (I don't see any way of fixing this other than breaking each word down into individual TextFields), but at least blurry is better than nothing. For now, to me this looks good enough to merge.
Also, instead of creating a new TextField for each line/word, what if inside the calcFrame
function:
text
property to that single line/word_pixels
BitmapDatatext
property rather than re-creating an additional TextField instance(I realize I abused bullet points here, but that sentence was getting really long, and that helped break it up)
The change you suggested to line 266 did not work (it rendered just a single line of text, even on multi-line ones).
About the change to the calcFrame
, I agree. I guess the reason why the original author used a Vector
was because he didn't want to mess with the rendering process, placing all the code within a while
. Or he didn't thought about that at all.
The code needs refactoring and I prefer to write the fix from ground up, using your approach. What do you think?
The code needs refactoring and I prefer to write the fix from ground up, using your approach. What do you think?
If you have time for it, go for it. Since changing the rendering process shouldn't break any existing code, it would be possible to fit it into this release.
I have some free time next week, will focus on that.
I realized we pushed further changes to FlxText
up until the next release, however, shall we include this fix in 2.56 since the code is already written, and aside from "justify" is working (which is much better than it was before)?
I have tested this in the sandbox, so I can confirm that it works, so I'm ready to merge if you are.
I've pushed it up to the next release because of that "justify" problem. I'm not a fan of trading one bug for another, so I think we should keep this issue out of the 2.56 release.
The current FlxText
has the blur problem, but at least it's fully functional regarding the alignments.
O.o Are we not dead?
I would say we are and HaxeFlixel is the way to go, but having this PR open on my Github dashboard was killing me 😝
Single and multi-line text work fine with "right", "left" and "center" alignment. The "justify", however, is not working.
Fix: https://github.com/FlixelCommunity/flixel/issues/108