This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Hi,
I'd like to propose a small change to the icon indicator to allow for texture co-ordinates and alpha settings.
Texture co-ordinates are necessary so that it is possible to render the same icons as the blizzard UI. What blizzard sometimes do is package a whole bunch of icons into one .blp file, the icon then needs to use texture co-ordinates to specificy which part of the .blp to render.
I've also added a setting for icon alpha. Sometimes transparent icons are useful if you'd like to show something that isn't all that important, e.g. a buff you can't cure, or the master looter status.
Finally I've written a separate module for the 5 man LFD role indicators. I include it here mostly as an example of why these Icon Indicator changes are useful, however you're welcome to include it into the main module if you wish. I don't know what your philosophy on these things is: The argument for including it is that it's in the blizzard UI and so if you want to replace the blizzard party frames with Grid2 you'd need this. The argument against is that it it's not 'critical' information that you'd rely upon in combat and so it's not necessary as part of the core.
Here's the patch:
Index: modules/IndicatorIcon.lua =================================================================== --- modules/IndicatorIcon.lua (revision 303) +++ modules/IndicatorIcon.lua (working copy) @@ -49,14 +49,23 @@ if (status) then Icon.Icon:SetTexture(status:GetIcon(unit)) Icon:Show() + if (status.GetTexCoord) then + Icon.Icon:SetTexCoord( status:GetTexCoord(unit) ) + else + Icon.Icon:SetTexCoord(0.05, 0.95, 0.05, 0.95) + end if (status.GetColor) then + local r, g, b, a = status:GetColor(unit) if (status.GetBorder and status:GetBorder(unit) > 0) then - Icon:SetBackdropBorderColor(status:GetColor(unit)) + Icon:SetBackdropBorderColor(r, g, b, a) else Icon:SetBackdropBorderColor(0, 0, 0, 0) end + Icon.Icon:SetAlpha(a or 1) else Icon:SetBackdropBorderColor(1, 0, 0) + Icon.Icon:SetAlpha(1) end if status.GetCount then local count = status:GetCount(unit)
Patch committed in rev304.
To post a comment, please login or register a new account.