ThreatClassic2

ThreatClassic2

10M Downloads

[BUG] Alpha color for bar background

Zhizhica opened this issue ยท 2 comments

commented

What steps will reproduce the problem?

  1. When Bar Backdrop color alpha value is set to zero, bar backdrop becomes black instead of beeing transparent

What version of ThreatClassic2 are you using? (Stating 'latest' is not useful)

Version: 2.45 for wrath

Do you have an error log of what happened?

There is no error log, just incorret behaviour

Any additional information? (example: WoW language if not English) (Attach screenshots here if available, do not link externally)

WoW language: Russian
Screenshot with error.
image

I was able to fix this issue by making following changes to core/core.lua
(git diff format)

@@ -311,7 +311,7 @@ function TC2:UpdateThreatBars()
             bar:SetValue(data.threatPercent)
             local color = GetColor(data.unit, data.isTanking, hasActiveIgnite)
             bar:SetStatusBarColor(unpack(color))
-            bar.bg:SetVertexColor(color[1] * C.bar.colorMod, color[2] * C.bar.colorMod, color[3] * C.bar.colorMod, C.bar.alpha)
+            bar.bg:SetVertexColor(color[1] * C.bar.colorMod, color[2] * C.bar.colorMod, color[3] * C.bar.colorMod, C.backdrop.bgColor[4])

             bar:Show()
         else
@@ -1450,6 +1450,7 @@ TC2.configTable = {
                                 cfg[2] = g
                                 cfg[3] = b
                                 cfg[4] = a
+                                C.backdrop.bgColor = cfg
                                 TC2:UpdateFrame()
                             end,
                         },

Screenshot with abovementioned changes:
image

Hope it helps!

commented

The issue is that there is an additional background texture fully linked to the bar settings that completely needed to be removed. That makes the backdrop working as expected. I renamed a few settings to apply reasonable defaults for anyone upgrading.

commented

Thanks for reporting btw. Here is how i resolved it:
8a38a2b