alkirah
Member
|
Execute some code on part of a Text?
Text::code(Str),code() allowing to set a single gui text object with multiple colors
This works fine to change colors, however, TextCode struct is unknown, so it's hard to figure out how to check if mouse if over a specific code part of a text object.
Basicly, I want to be able to link from a chat window to different function.
If user click on the name of the chat line sender, it will automaticly open a private message textline with that nickname already written on it, if user linked an object on the chat, or a quest, or something else, I want to show the item/quest/etc, description in a tooltip.
Any hints on how I can do it?
In a text object, _code seems to be a ptr to a memc struct, and _codes seems to be _code.Elms()
This line. [color=F00]equals[/color] 4 [color=00F]codes[/color]
I want to know if mouse is over that text element, which code mouse is over? 1,2,3 or 4?
I either want to execute a func (specified in the text::code function) or be able to get a TextCode structure on which I can check what code I need to run based on the color of the code.
Thanks
Alkirah
|
|
10-28-2011 02:11 PM |
|