Thread Tools Display Modes
Prev Previous Post   Next Post Next
09/16/20, 07:08 PM   #1
QuantumPie
AddOn Author - Click to view addons
Join Date: Sep 2019
Posts: 32
Setting Unique Sizes for Group Member Map Pins

I'm attempting to make an addon that lets you change a specific group members pin to make them more distinguishable. I used Votan's Map Pins as a base and from what I've gathered, you can access ZO_MapPin.PIN_DATA and filter by crown, group, and players. What I don't understand is there is a function for choosing a icon and tint, and I was able to customize it so a specific player could have a unique one. However, for size and level, I tried setting them to a function which acted similarly and I get errors (I'm assuming because those two fields only accept an integer that effects all pins of that category). So since it doesn't look like I can change the level and size through a similar means as texture and tint, how else can I change those two values on a per pin basis? Here is a sample of the relevant code:

Lua Code:
  1. function addon.IconFromName(pin)
  2.     if not pin then return "" end
  3.     local unitTag = GetUnitTag(pin)
  4.     if not unitTag then return "" end
  5.  
  6.     AddOverlayIcon(pin, unitTag)
  7.     local name = GetUnitDisplayName(unitTag)
  8.     local info = addon.account.name[name]
  9.     if info ~= nil then
  10.         return info.icon
  11.     end
  12.     return "/esoui/art/mappins/ui-worldmapgrouppip.dds"
  13. end
  14.  
  15. local leader = ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP_LEADER]
  16. local group = ZO_MapPin.PIN_DATA[MAP_PIN_TYPE_GROUP]
  17.  
  18. leader.texture = addon.IconFromName
  19. group.texture = addon.IconFromName
  20. leader.tint = addon.TintFromName
  21. group.tint = addon.TintFromName
  22.  
  23. group.size = addon.SizeFromName -- Doesn't work. Only accepts integers
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » Setting Unique Sizes for Group Member Map Pins

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off