Quantcast
Channel: ESOUI - AddOns by Shinni
Viewing all articles
Browse latest Browse all 162

CustomCompassPins (1.29)

$
0
0
Change Log:
--------------------
v 1.29 (Shinni)
- adding multiple pins with the same pinTag doesn't result in stuck pins anymore

v 1.28.1 (Shinni)
- changed how pins are indexed, individual pins can now be deleted and accessed directly
- removed a buggy background texture that would display behind the pin's real texture
- updated API version

v1.26 (Garkin)
- updated API version
- minor changes in callbacks

v1.25 (Garkin)
- changed timing of WorldMap update, so shuttering when map is closed should be less noticeable

v1.24 (Garkin)
- update from version 1.21 now should work correctly

v1.23 (Garkin)
- fixed bug introduced in 1.22, map should be updated correctly now

v1.22 (Garkin)
- fixed bug where library could have loaded pins for different map

v1.21 (Garkin)
- changed way to detect map change, it should be more efficient
- :AddCustomPin method now checks if arguments are valid
- callback has now just one argument mapName (eg. "auridon/auridon_base"):
CALLBACK_MANAGER:RegisterCallback("CustomCompassPins_MapChanged", function(mapName) end)

v1.20 (Garkin)
- updated APIversion to 100004
- changed GetDistanceCoefficient function
- changed update frequence from 10ms to 20ms.
- added callback "CustomCompassPins_MapChanged". To register for callback use:
CALLBACK_MANAGER:RegisterCallback("CustomCompassPins_MapChanged", function(zone, subzone) end)

v1.19 (Garkin)
- fixed issue with invalid map size

v1.18 (Garkin)
- another fix for refreshing pins and distance coefficient

v1.17 (Garkin)
- fixed bug with refreshing pins

v1.16 (Garkin)
- different method to detect map change, previous didn't work when player had no quests.

v1.15 (Garkin)
- fixed possible issue with distance coefficient
- added addon manifest (.txt)
- added delay to update function

v1.14 (Garkin)
- compass distance is now scaled with the mapsize (approximate)

v1.13
- when creating and removing a lot of pins the pinTypes could mix up, resulting in incompabilities of differ...

Description:
--------------------
This Library allows you to add custom pins to the compass.

How to install:
You may either embed the library in your addon and load the files from your addon manifest, or have the library installed like any other normal addon.

If you are depending on the library being installed separately and are not embedding it, then you must include this line in your addon manifest:
## DependsOn: CustomCompassPins
Either way you choose, there will be just one copy of the library (the newest revision) loaded into memory.

How to use:

First you have to add the pinType:
COMPASS_PINS:AddCustomPin( pinType, pinCallback, layout )
pinType is a unique string eg "MySkyshards"
pinCallback is a callback function which receives a pinManager (more further below)
layout is a table which specifies texture and other settings for the pins of this pinType

The callback function
The callback function is called everytime, the compass is refreshed.
This function creates the pins via the given pinManager (first and only parameter).
example:
function( pinManager )
for _, pin in pairs( pins ) do
pinManager:CreatePin( pinType, pinTag, pin.x, pin.y )
end
end
The pinManager has only one method: CreatePin( pinType, pinTag, xLoc, yLoc )
pinType the pinType the created pin belongs to
pinTag an unique identifier for the pin. You can pass additional attributes to the pin via the pinTag, which can later be used (see layout for more information).
xLoc, yLoc[/C...

Viewing all articles
Browse latest Browse all 162

Trending Articles