Is there a way to select individual words in a text field? Let’s say that player clicks on a word, I’d like to select that word, color it, know exactly which word was clicked on. Is there an easy way to do it?
I thought of two solutions - I think I could have a lot of text fields, one for each word. However, I think that could be heavy performance-wise. Another thing to try is to get an individual character that was clicked using TextField’s method getCharIndexAtPoint(). Then I could iterate through characters to find the beginning and ending of the word.
But is there any other way to select words?