Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per character effects #7

Closed
subsoap opened this issue Feb 27, 2018 · 2 comments
Closed

Per character effects #7

subsoap opened this issue Feb 27, 2018 · 2 comments

Comments

@subsoap
Copy link
Contributor

subsoap commented Feb 27, 2018

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.

@dapetcu21
Copy link
Contributor

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.

@britzl
Copy link
Owner

britzl commented Mar 2, 2018

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

@britzl britzl closed this as completed Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants