Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

Releases: demonnic/fText

Fixed wordwrapping with embedded colour codes

25 May 00:55
Compare
Choose a tag to compare

This release only really brings a few small changes, but the main important one is with word wrapping. Word wrapping used by fText and all its derivatives will now properly wrap items with embedded colour codes, based on the formatType option. For example, the current behaviour looks like so (I apologize in advance for the colours used):

image

Word wrapping against the base string, without any color codes in it:

image

And the newly fixed word wrapping for coloured text:

image

You can use demonnic.xwrap(str, width, type) to wordwrap your coloured text. If you want to wordwrap text for cecho, use 'c' for type, 'd' for decho and 'h' for hecho. If you pass anything else, or do not pass a type, then it will wordwrap using the old demonnic.wordWrap function, which words great for uncoloured text.

Also, if you were using demonnic.wordWrap directly yourself, you were likely using it as demonnic:wordWrap(str, width) ... but you should change that to demonnic.wordWrap rather than demonnic:wordWrap.

In which I fix a gigantic bug

19 Mar 20:59
063f2cd
Compare
Choose a tag to compare

For real, anything aligned left or right was 1 character short. I don't know how I missed this and how it wasn't reported, but while I was writing tests for fText it became glaringly obvious.

demonnic.fText now has 16 tests for me to run against it when making changes to make sure I didn't break anything. I'll get them included in the source code soon but this should make future changes easier.

1.2.0 now with echoLink and echoPopup support baked in

26 Aug 00:16
Compare
Choose a tag to compare

Here's a brief demo video of the echoLink and echoPopup functionality: https://youtu.be/_XnaJlkI7WM