Thread: Copy Tooltip
View Single Post
01/30/15, 08:34 PM   #4
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by circonian View Post
Hm, well I guess I'm doing something else wrong then. Thats what I was trying to do, but it doesn't show up properly.
I will look at miniMap, thank you for the info.
Ah, sorry there is pinType instead of pinTypeString.

Lua Code:
  1. local pinType = pin:GetPinType()
  2. local tooltipData = pin.TOOLTIP_CREATORS[pinType]
  3. InitializeTooltip(tooltipData.tooltip, yourControl, anchorPoint, xOffset, yOffset)
  4. tooltipData.creator(pin)


In Update 6 will be this code a bit different because WorldMap uses mode instead of tooltip control, so it will look like this:

Lua Code:
  1. local function GetTooltip(mode)
  2.     if mode == 1 then
  3.         return InformationTooltip
  4.     elseif mode == 2 then
  5.         return ZO_KeepTooltip
  6.     elseif mode == 3 then
  7.         return ZO_MapLocationTooltip
  8.     elseif mode == 4 then
  9.         return ZO_ImperialCityTooltip
  10.     else
  11.         return mode
  12.     end
  13. end
  14.  
  15. local pinType = pin:GetPinType()
  16. local tooltipData = pin.TOOLTIP_CREATORS[pinType]
  17. InitializeTooltip(GetTooltip(tooltipData.tooltip), yourControl, anchorPoint, xOffset, yOffset)
  18. tooltipData.creator(pin)

Last edited by Garkin : 01/30/15 at 08:38 PM.
  Reply With Quote