-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Center/Right Alignment #26
Comments
As i see it in the source code, there is a command named ^ba which does exactly this but i can't get it to work. It calls the function "get_block_align_vals" and sets alignment, but every time i use it my text goes out of the draw area even though i use ^ba(0,_LEFT/_CENTER/_RIGHT) Alignment is still possible as long as you know the font width by using "^pa( $(( |
Left/right/center alignment is possible with the already mentioned (undocumented) |
So after playing around a bit I found an option that -seems to be working- for showing text on both the left and the right side, without it rendering off-screen. This naive approach does not work (assuming 1080p resolution):
The issue here is that the left text "pushes" the right text over too far to the right. The more text is on the left the more the right text will be cut off. Flipping left and right around however seems to work:
Now the right text is drawn first, so it doesn't get "pushed" off the edge. This is most likely a bug in how the offsets are calculated in the case of right aligned text, by assuming there is no left-aligned text to deal with. edit: Well scratch that, now it doesn't work either. I swear it was working earlier. edit2: This actually works:
edit3:
Works
Does not work :( |
Currently, if the tags
^p(_LEFT)
,^p(_CENTER)
or^p(_RIGHT)
are used, only the cursor is moved. This causes all following text to be drawn after the cursor rather than it being centered or right justified.If this is intended functionality, then I would like to suggest adding a center and right-justify tag.
The text was updated successfully, but these errors were encountered: