View Single Post
02-27-19, 12:52 AM   #3
lightspark
A Rage Talon Dragon Guard
 
lightspark's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2012
Posts: 341
If you don't set your own statusbar texture via SetStatusBarTexture, oUF will do it for you. It also says so in its docs.

And according to your own code, you don't do that:
Lua Code:
  1. local f = CreateFrame('Statusbar', nil, UIParent)
  2. f:SetSize(100, 20)
  3. f:SetPoint('CENTER')
  4. -- you're using SetTexture and not SetStatusBarTexture
  5. f:SetTexture(some generic texture with no coloring or tinting)
  6. f:SetStatusBarColor(1, 0, 0)

Here's mine:
Lua Code:
  1. local f = CreateFrame('Statusbar', nil, UIParent)
  2. f:SetSize(128, 24)
  3. f:SetPoint('CENTER')
  4. f:SetMinMaxValues(0, 128)
  5. f:SetValue(48)
  6. f:SetStatusBarTexture("Interface/BUTTONS/WHITE8X8")
  7. f:SetStatusBarColor(1, 1, 0)
  8.  
  9. local g = CreateFrame('StatusBar', nil, UIParent)
  10. g:SetSize(128, 24)
  11. g:SetPoint('CENTER', 0, -24)
  12. g:SetMinMaxValues(0, 128)
  13. g:SetValue(64)
  14. g:SetStatusBarTexture("Interface/BUTTONS/WHITE8X8")
  15. g:SetStatusBarColor(0, 0, 0, 0)
  16.  
  17. g.texture = g:CreateTexture(nil, 'BORDER')
  18. g.texture:SetAllPoints(g:GetStatusBarTexture())
  19. g.texture:SetColorTexture(1, 1, 0)

__________________

Last edited by lightspark : 02-27-19 at 08:16 AM.
  Reply With Quote