Closed subsoap closed 6 years ago
Maybe just <char>
should be enough. You could do:
Taste the <rainbow><char>RAINBOW!</char></rainbow> or <doom><char>don't</char></doom>
and then just use richtext.tagged(words, "rainbow")
to get the chars for rainbow.
Added support for richtext.characters(word) to split a word into individual characters with correct tag settings and nodes positioned correctly. See example for sine-wave words.
https://github.com/britzl/defold-richtext/releases/tag/2.5.0
A way to break words within special tags into individually characters and then be able to iterate over them to produce different effects.
Maybe something like
Taste the <char class="rainbow">RAINBOW!</char> or <char class="doom">don't</char>
Would return two char numeric tables with a node for each character within the char tag allowing the char tables to be stored and their nodes iterated over to produce different effects.