defold-richtext
defold-richtext copied to clipboard
Add a richtext.remove equivalent for characters
I just want to request the equivalent of the remove function to work with richtext.characters. Though adapting richtext.remove to work with characters would work as well.
Could you please be a bit more specific about exactly what you expect from such a function? Could you give an example of how it would be used and what the expected result is?
Well remove does this.
richtext.remove(words)
Removes all gui text nodes created by richtext.create() I was hoping for an equivalent for the same function for richtext.characters.
Since a similar existing function already existed I thought to ask for it.
Though my use case currently is that currently I get the result of create. And replace some of the words with the characters like:
Words = richtext.create("some sentence")
local temp = richtext.characters(Words[1]) richtext.remove(Words[1]) Words[1] = temp.
On cleanup I would like to do the same as
richtext.remove(Words) or a similar richtext.removeCharacters(Word[1])
to simplify cleanup. Probably easy to do manually but thought I should ask since a similar function already exists