View Single Post
03-26-14, 10:04 AM   #3
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
The layer is set to BACKGROUND. Is the texture rendered behind the frame or frame background texture? Try to set the texture draw layer to "TOOLTIP" instead of "BACKGROUND".

The following code does show the texture:
Lua Code:
  1. local strvars = {}
  2.     strvars["enchant_title"] = UIParent:CreateFontString(nil, "OVERLAY", "GameFontNormal")
  3.     strvars["enchant_title"]:SetPoint("CENTER", UIParent, "CENTER", 0, -20)
  4.     strvars["enchant_title"]:SetText("Missing Enchants:")
  5.     strvars["enchant_title"]:SetJustifyH("LEFT")
  6.     strvars["enchant_title"]:CanWordWrap(true)
  7.     strvars["enchant_title"]:SetWidth(CharacterModelFrame:GetWidth() - 20)
  8.     key = 1
  9.         -- Item icon.
  10.         strvars["eBTN" .. key] = CreateFrame("Button", nil, infoFrame)
  11.         strvars["eBTN" .. key]:SetWidth(16)
  12.         strvars["eBTN" .. key]:SetHeight(16)
  13.         if key == 1 then
  14.             strvars["eBTN" .. key]:SetPoint("TOPLEFT", strvars["enchant_title"], "BOTTOMLEFT", 0, -5)
  15.         else
  16.             strvars["eBTN" .. key]:SetPoint("TOPLEFT", strvars["eBTN" .. (key - 1)], "BOTTOMLEFT", 0, -10)
  17.         end
  18.         strvars["eBTN" .. key]:SetFrameStrata("HIGH")
  19.  
  20.         strvars["eICO" .. key] = strvars["eBTN" .. key]:CreateTexture(nil, "BACKGROUND")
  21.         strvars["eICO" .. key]:SetTexture("Interface\\Tooltips\\UI-Tooltip-Background")
  22.         strvars["eICO" .. key]:SetAllPoints(strvars["eBTN" .. key])

So either your texture is behind the frame background, or the variable 'texture' does not contain a texture path.

Last edited by Duugu : 03-26-14 at 11:14 AM.
  Reply With Quote