Hello,
I noticed in the Gideros Documentation, that textfield class has setTextColor function but it lacks the ability to change some word in the text to a certain color. Is there some way that i can achieve this elegantly ? (or has anybody built a gideros library for that ?). Must be nice if we can put some html code there to format the text.
Thanks
Comments
You could use my old bmfont lib here http://github.com/nascode/BMFont
It predate official bmfont support of Gideros. So it will be less performant. But in exchange you could change color of certain words in a sentence. And you have access to each letter bitmap for animation purpose.
look at the example here https://github.com/nascode/BMFont/blob/master/examples/basic/main.lua
http://www.nightspade.com
On this topic i previously done some improvement in textwrap class. (Using ttf fonts)
For details see the topic please. It is not %100 complete but hope it will help you.
http://www.giderosmobile.com/forum/discussion/1580/textwrap-addition#Item_9
----------------------------------------------------------------------
Ok here is my work so far.
1-I switched to @atilim 's version of Textwrap2 class and added alignment,linespacing,letterspacing,defaultcolor change and special coloring of rows properties.
Here is the example of the init function
text = text to show on screen
areaWidth = textarea width on screen
areaHeight = textarea height on screen
lineSpacing = text's line spacing
letterSpacing = text's letter spacing
align = Supporting "left","right" or "center" by default it is "left" alligned.
font =ttf font to be used
mainColor = text's main color by default black
color1@" signs will be omitted from the text.
-----------------------------------------------------------------
Likes: hgvyas123