You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: