Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align FlxText between all targets #2536

Merged
merged 1 commit into from
Apr 18, 2022
Merged

Align FlxText between all targets #2536

merged 1 commit into from
Apr 18, 2022

Conversation

DigiEggz
Copy link
Contributor

@DigiEggz DigiEggz commented Apr 18, 2022

The desktop and mobile versions of FlxText do not render in the same visual location as web, instead rendering +1 x/y from the origin. See here for discussion: #2528

Separately, the code for centering text on a button has always used (x - 1, y +3), even as far back as 2013. Changes to text (possibly through OpenFL) have improved centering and no longer need the (x - 1), which currently causes it to render off-center.

The desktop and mobile versions of FlxText do not render in the same visual location as web, instead rendering +1 x/y from the origin.

Separately, the code for centering text on a button has always used (x - 1, y +3), even as far back as 2013. Changes to text (possibly through OpenFL) have improved centering and no longer need the (x - 1), which currently causes it to render off-center.
@Geokureli
Copy link
Member

care to add some images verifying the improvements?

@DigiEggz
Copy link
Contributor Author

Sure thing!

Comparison of text rendering location:

Old vs New
old_align new_align

Comparison of button label centering:

Old vs New
old_center new_center

@Geokureli Geokureli merged commit 0e712ed into HaxeFlixel:dev Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants