Author Topic: How to receive which item on chat list was clicked?  (Read 1218 times)

spyridon

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
How to receive which item on chat list was clicked?
« on: June 12, 2014, 04:12:01 PM »
I'm trying to modify the chat window that was provided by default in NGUI sample scenes. If I want to add functionality where it will message the user who is speaking when you click their name, I need to be able to receive an index of which item was clicked.

How would I go about receiving an index of which item was clicked in chat box? I tried to add a collider to it with code but had no success... Any guidance (or even better some sample code) would be appreciated!

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to receive which item on chat list was clicked?
« Reply #1 on: June 13, 2014, 04:09:59 AM »
Use the 'url' tag to encode any number of data. It's not just for URLs -- it can be used to store item identification, tooltips, or even action triggers.

In Starlink, when you are idling in chat, you get notification of games started by players that you can then join by clicking on the chat message.