Re: Auto-indenting wrapped text in a frame
By: Codefenix to All on Tue Nov 28 2023 11:51:05
Is there a simple way to automatically pad new lines of text with say, 6 leading whitespaces when wrapping text in a frame (i.e.: word_wrap = true)?
No, there isn't.
What I'm trying to achieve is adding such an indent to wrapped lines of dialog in MRC. I added a HH:MM timestamp recently, and think it would look nicer if the next line began after where the timestamp ended in the previous line.
You could put the text that you want to align into its own word-wrapped frame:
-frame- -frame----------------------
[HH:MM] [text that might be wrapped]
And then you probably want to use frame.data_height to determine the height after wrapping of that second frame, and use it to set the actual height of that frame, and use it to offset the y position of the next row of content, etc.
The alternative is adding an indentation option to Frame and messing around with the word wrapping logic there. Probably doable but probably a pain.
---
echicken
electronic chicken bbs - bbs.electronicchicken.com
---
� Synchronet � electronic chicken bbs - bbs.electronicchicken.com