Author Topic: Attach item like mmo chat  (Read 1340 times)


  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Attach item like mmo chat
« on: May 14, 2016, 09:37:12 PM »
In most mmo's you can link item in the chatbox. The caret can't pass through the item text, eg: "blah blah [item name] blah blah".

If the user try to click in the middle of "[item name]" or even try to move the caret with the arrow keys, the textbox will treat the attached item as object, and the caret will skip the link.

My question is: What is the proper way to do this? Creating a custom symbol for the UIInput? Maybe something like [item]name here[/item]? There is another way to do this? Actually, my main problem here is to make the caret skip the text inside of the tag (supposing that the custom symbol is the correct way to do this).

Animated gif of what I'm talking about:


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Attach item like mmo chat
« Reply #1 on: May 18, 2016, 04:35:25 AM »
While you can certainly create links in readable text, you can't do that in input. What I did in Windward is have options to "link to chat" in Windward via right-clicking an item. Doing so automatically pasted the item's stats, color coded, into the chat box but I could have also created a clickable link instead. The key though, is not to put it into the input field, but to send it right away instead. That's what makes it trivial.

Otherwise it gets a lot more complicated.