If you want to be able to change text color halfway through without splitting into multiple commands, here's just that at a price of 150 tokens / 265 compressed chars.
printc("hello ^8world^7!", 4, 4)
Could have been a bit smaller if there were functions to convert string to/from charcode.
P#11746 2015-07-21 18:40 ( Edited 2017-10-10 20:34)
Works perfectly, thanks for this!
P#19194 2016-03-12 09:34 ( Edited 2016-03-12 14:34)
Neat! Realized I wanted something like this for a thing I'm working on, getting it integrated was nice and quick.
A couple notes:
There seems to be a variable name error in the current version -- you use "T" throughout for the source text parameter, except at one point where you use "TEXT" in a string-measuring "#TEXT" bit.
- Expanding the stringc() library with a modified length() call that disregards color control characters could be handy for basic applications that depending on e.g. sizing something on screen to the width of only teh displayed characters of a string. The standard #x call for a string x will report a wider string than printc(x) produces.
P#19321 2016-03-20 12:14 ( Edited 2016-03-20 16:14)
[Please log in to post a comment]