View Single Post
11-01-18, 09:01 AM   #3
jeruku
A Cobalt Mageweaver
 
jeruku's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2010
Posts: 223
In this case you may need to change the texture every time it is set by the default UI. This can be achieved using the funciton hooksecurefunc. Otherwise you will keep tainting the UI.

This work around is provided you can not find where it keeps resetting the texture. If you happen to know where/how it is being reset there may be some other options.

Lua Code:
  1. -- So instead of:
  2. -- castBar.SetStatusBarTexture = function(...) end
  3.     -- You'd use:
  4.     local redundant
  5.     hooksecurefunc(castBar, "SetStatusBarTexture", function(self, ...)
  6.         if not redundant then
  7.             redundant = true
  8.             self:SetStatusBarTexture(textureB)
  9.             redundant = false
  10.         end
  11.     end)
__________________
"I have not failed, I simply found 10,000 ways that did not work." - Thomas Edison

Last edited by jeruku : 11-01-18 at 09:02 AM. Reason: typo
  Reply With Quote