I am showing a chat message to players with areas of importance contained within the text, such as a specific player's name. How can I go about handling being able to click on either that portion of the message, or even simpler just the entire message itself to invoke an event like opening a dialog?
My only lead so far is generically handling a mouse click on the entire game UI, calculating the width/height of the specific text I sent as a chat message, seeing if it newline-wrapped, etc, etc, etc to get a bounding area specific to that chat message using the default mouse click event. As determing this bounding area would be an obscene amount of work, are there any alternatives?
I believe list boxes won't auto-wrap the text to the next line.
Another idea would to just display the text in the same size/font/style as the normal text message, but in a dialog label that accepts mouse (If this doesn't work, just put an invisible button right over it). Place this dialog RIGHT below where text messages display, so that it feels natural.
I am showing a chat message to players with areas of importance contained within the text, such as a specific player's name. How can I go about handling being able to click on either that portion of the message, or even simpler just the entire message itself to invoke an event like opening a dialog?
My only lead so far is generically handling a mouse click on the entire game UI, calculating the width/height of the specific text I sent as a chat message, seeing if it newline-wrapped, etc, etc, etc to get a bounding area specific to that chat message using the default mouse click event. As determing this bounding area would be an obscene amount of work, are there any alternatives?
@soulzek: Go
scrap the messages to a text out put channel
make a dialog with a list
create list items as you want the messages displayed....
customize the look to get it how you want it
be pro
@SouLCarveRR: Go
I believe list boxes won't auto-wrap the text to the next line.
Another idea would to just display the text in the same size/font/style as the normal text message, but in a dialog label that accepts mouse (If this doesn't work, just put an invisible button right over it). Place this dialog RIGHT below where text messages display, so that it feels natural.
Dialogs as mentioned above but it is more work than it is worth to achieve what you want to do.