How do you easily display UNDERLINE text? I’m trying to create an interactive book and I would like to highlight the keywords with UNDERLINE text and make them clickable. How do I underline text? I’m also using custom fonts in displaying the text. Thank you =) [import]uid: 87837 topic_id: 21593 reply_id: 321593[/import]
Hello,
I don’t know if you can underline, but you could put a
button over the text you want as clickable and set the
button.alpha = 0.1, maybe capitalize the word then use
the alpha button …just a thought…
Happy Coding…
Larry
[import]uid: 107633 topic_id: 21593 reply_id: 85631[/import]
If you want to underilne each word that is being highlighted, you could find out the x,y of the text, its width (or some width), and then create a display.newLine at each word highlighted.
to create the word clickable, - create a rectangle that fits over the word and make it clickable. make it with a 1% transparency as fully transparent objects don’t register touch events.
c [import]uid: 24 topic_id: 21593 reply_id: 85663[/import]
Well I would follow the above two for that, mainly the display.newLine when event.phase == began, but i did find this site which actually makes symbols into text, very helpful while making some of my games: http://www.ssec.wisc.edu/~tomw/java/unicode.html#x2600 [import]uid: 38977 topic_id: 21593 reply_id: 85670[/import]
LOL sorry, this code verification thing made me post three times, sorry about that!! [import]uid: 38977 topic_id: 21593 reply_id: 85674[/import]
Thanks everyone for your help. With your above advice and suggestions, I got it working.
With my words that need to be clickable, I made them into new text objects (i.e. display.newText) and then placed the new line (i.e. display.newLine) underneath them. Also, you can add touch events to text objects, so that is how I made them clickable =) [import]uid: 87837 topic_id: 21593 reply_id: 85855[/import]
you could just use a font that’s already underlined [import]uid: 7911 topic_id: 21593 reply_id: 85868[/import]
