Results 1 to 7 of 7

Thread: Custom tool tips no longer render

  1. #1
    Basic Member
    Join Date
    May 2015
    Posts
    13

    Exclamation Custom tool tips no longer render

    Hi,

    Normally I would debug the game myself but I am away from my PC om business for the weekend. Custom tool tips no longer load when created through the Javascript api. it happened to my game and I also got my brother to check For the king beacon fire because I knew they had nice custom tool tips as well. turns out their tooltip also don't load. this bug was introduced with the latest main client update.

    *EDIT* I'm at a hotel on my laptop so I can give more information. It's this javascript method: DOTAShowTitleTextTooltip(string title, string text). In the text I pass some $.Localized strings and some html. The panels are html="true" enabled


    Thanks for any help,
    ChalkyBrush
    Last edited by ChalkyBrush; 10-16-2015 at 11:31 PM.

  2. #2
    Basic Member
    Join Date
    Jan 2012
    Posts
    144
    http://dg-lab.com/qomik
    works fine for me

  3. #3
    Basic Member
    Join Date
    May 2015
    Posts
    13
    Quote Originally Posted by DoctorGester View Post
    http://dg-lab.com/qomik
    works fine for me
    Just got home, I isolated the issue.

    The text included in the tooltip event includes stuff like: <font color='white'>
    This used to work. Since the last reborn update, the function can no longer parse this

    Isolated it further, apostrophe's won't be accepted in the javascript function DOTAShowTitleTextTooltip(string title, string text). I had this problem with commas before too
    Last edited by ChalkyBrush; 10-17-2015 at 01:18 PM.

  4. #4
    Basic Member
    Join Date
    May 2015
    Posts
    13
    Solved by adding this line:

    title = title.replace(/(['"])/g, "\\$1");
    tooltip = tooltip.replace(/(['"])/g, "\\$1");
    $.DispatchEvent("DOTAShowTitleTextTooltip", $.GetContextPanel(), title, tooltip);

  5. #5
    Basic Member
    Join Date
    Jun 2015
    Posts
    20
    can you elaborate on your solution? so i guess inline tags don't work anymore because it doesn't accept apostrophes?

  6. #6
    Basic Member
    Join Date
    Jan 2012
    Posts
    144
    zile, I guess he had to escape quotes with \
    Last edited by DoctorGester; 10-21-2015 at 05:20 AM.

  7. #7
    Basic Member
    Join Date
    Jun 2015
    Posts
    20
    Quote Originally Posted by DoctorGester View Post
    zile, I guess he had to quotes with \
    yeah i realized i was having another problem instead (didn't realize i had to set html=true for labels to work with inline tags). thanks for the help anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •