View Single Post
02-27-19, 06:39 AM   #4
Terenna
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 105
First off, thank you both. Second, I'm sorry, I should have just actually coded it rather than dry coded it and actually taken a screenshot. I've done both:
Lua Code:
  1. local a = CreateFrame('Statusbar', nil, UIParent)
  2. a:SetSize(100, 20)
  3. a:SetPoint('CENTER', 0, -200)
  4. a:SetStatusBarTexture('Interface\\AddOns\\tMinimap\\Texture')
  5. a:SetMinMaxValues(0, 1)
  6. a:SetValue(0.5)
  7. a:SetStatusBarColor(1, 0, 0)
  8.  
  9. local b = CreateFrame('StatusBar', nil, UIParent)
  10. b:SetSize(100, 20)
  11. b:SetPoint('CENTER', 0, -230)
  12. b:SetMinMaxValues(0, 1)
  13. b:SetValue(1)
  14.  
  15. b.texture = b:CreateTexture(nil, 'BORDER')
  16. b.texture:SetAllPoints()
  17. b.texture:SetTexture('Interface\\AddOns\\tMinimap\\Texture')
  18. b.texture:SetColorTexture(1, 0, 0)
  19. b:SetStatusBarColor(g.texture)
  20.  
  21. local c = CreateFrame('Frame', nil, UIParent)
  22. c:SetSize(100, 20)
  23. c:SetPoint('CENTER', 0, -260)
  24. c.texture = c:CreateTexture(nil, 'BORDER')
  25. c.texture:SetAllPoints()
  26. c.texture:SetTexture('Interface\\AddOns\\tMinimap\\Texture')
  27. c.texture:SetColorTexture(1, 0, 0)

which generates this:

It turns out, despite it being a perfect white in photoshop (eyedrop says #FFFFFF), that texture is somehow displaying colors differently, but only when using :SetStatusBarTexture? When I use "Interface/BUTTONS/WHITE8X8" all three colors are the exact same.

I guess the question still stands then, why would a texture appear differently when using SetStatusBarTexture(direct texture file) and SetStatusBarColor vs SetStatusBarTexture(Some texture set to the direct texture file) and SetColorTexture?

Last edited by Terenna : 02-27-19 at 07:41 AM.
  Reply With Quote