While working on the new text input, I found out that when compiling to HashLink, FlxText's align would return CENTER by default (not having changed it manually), instead of LEFT. This seems to be caused by the switch statement in FlxTextAlign.fromOpenFL() treating the null value as a 0, which corresponds to CENTER in OpenFL's text alignment enum (which is an abstract for Int).
This PR simply adds a null check in the function, which makes it automatically return LEFT if a null alignment was passed in.
While working on the new text input, I found out that when compiling to HashLink, FlxText's
align
would return CENTER by default (not having changed it manually), instead of LEFT. This seems to be caused by the switch statement inFlxTextAlign.fromOpenFL()
treating thenull
value as a 0, which corresponds to CENTER in OpenFL's text alignment enum (which is an abstract for Int).This PR simply adds a null check in the function, which makes it automatically return LEFT if a null alignment was passed in.