• Auto-indenting wrapped text in a frame

    From Codefenix@VERT/CONCHAOS to All on Tue Nov 28 17:51:05 2023
    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)?

    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.

    Example of current state:

    12:34 <codefenix> this is a long line of text which should autowrap when we get to this part of it

    Desired state:

    12:34 <codefenix> this is a long line of text which should autowrap when we
    get to this part of it

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...Logic and practical information do not seem to apply here.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
  • From echicken@VERT/ECBBS to Codefenix on Wed Nov 29 00:19:16 2023
    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
  • From Codefenix@VERT/CONCHAOS to echicken on Wed Nov 29 19:58:33 2023
    Re: Auto-indenting wrapped text in a frame
    By: echicken to Codefenix on Tue Nov 28 2023 06:19 pm

    No, there isn't.
    You could put the text that you want to align into its own word-wrapped frame:

    Ok, that's an interesting idea, thanks.

    |01<|09co|03d|11e|15Ÿ|11e|03n|09ix|01>|07


    ...To love oneself is the beginning of a lifelong romance.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-