syndenbock / MinimapButtonButton

A World of Warcraft addon for collecting minimap buttons
7 stars 4 forks source link

Replace Button Class Color Function #39

Closed MetalNeon closed 2 months ago

MetalNeon commented 2 months ago

I'm asking for the button's color to be determined by CUSTOM_CLASS_COLORS instead of RAID_CLASS_COLORS like how it currently is. In Classic Era addons that change Shaman Colors to blue via RAID_CLASS_COLORS end up causing errors so I swapped to one that uses CUSTOM_CLASS_COLORS instead. The button as of now calls on the old variable, but I was able to change Utils.lua and altering line 32 as follows

local color = _G.CUSTOM_CLASS_COLORS[select(2, _G.UnitClass(unit))] or _G.RAID_CLASS_COLORS[select(2, _G.UnitClass(unit))];

I would really appreciate support for this.

syndenbock commented 2 months ago

I changed that logic a bit so it doesn't throw an error if CUSTOM_CLASS_COLORS doesn't exist and added it to the addon. Could you please check if version 1.20 properly uses the custom colors? I only checked by manually creating a CUSTOM_CLASS_COLORS table.

MetalNeon commented 2 months ago

Just checked, 1.20 seems to be working properly. Thank you