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

Text should be able to be horizontally justified #23

Closed
bil-bas opened this issue Jul 19, 2011 · 0 comments
Closed

Text should be able to be horizontally justified #23

bil-bas opened this issue Jul 19, 2011 · 0 comments

Comments

@bil-bas
Copy link
Contributor

bil-bas commented Jul 19, 2011

It is usual to place text so that the position given is the at the center or right of the text, so that it can be aligned nicely with other screen elements. This could be done with an :origin, similar to sprites, but that wouldn't work well since Text objects will often be resized.

I suggest something like an :origin, but [0..1, 0..1] or, probably easier to use and coving 99% of use cases, justify: [:left, :right, :center]. For completeness, a vertical alignment could be added (:top, :center, :bottom)

As an extra suggestion, this system might be useful for sprites too, so you could use origin = [:left, :top], since that is more explicit than passing the image size.

The only part that is really important, however, is some way to horizontally justify text.

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

No branches or pull requests

2 participants