Originally Posted by Garkin
There is no such event...
I was playing around with compass in my test addon Compass Distance ( http://www.esoui.com/forums/showthread.php?p=9208).
I don't know if it is the best way, but have hooked OnUpdate function:
Lua Code:
ZO_PreHookHandler(COMPASS.container, "OnUpdate", function() --do stuff end)
And from there I'm calling:
Lua Code:
for i = 1, COMPASS.container:GetNumCenterOveredPins() do local description, pinType, distance, drawLayer, drawLevel, isSupressed = COMPASS.container:GetCenterOveredPinInfo(i) if not isSupressed then --do stuff end end end
|
That would also work. Just don't forget to return false or compass will not update.