Thread Tools Display Modes
10-26-10, 04:43 PM   #1
lilgulps
A Theradrim Guardian
 
lilgulps's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 62
Images In Frames?? Help :D

Code:
local f = CreateFrame("Frame")
f:SetPoint("CENTER", UIParent, "CENTER")
f:SetHeight(93)
f:SetWidth(65)

local tex = f:CreateTexture(nil, "ARTWORK")
tex:SetTexture("Interface\\Addons\\SPGe\\Images\\5p")
tex:SetAllPoints(f)
5p is a .tga file and their are no errors on load except that I can not see any frames, what am I doing wrong?
  Reply With Quote
10-26-10, 04:57 PM   #2
Ferous
Sheer Sense of Doom
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 863
Code:
local f = CreateFrame("Frame", nil, self)
f:SetFrameStrata("LOW")
f:SetWidth(200)
f:SetHeight(100)
	
	-- Creating the texture for the frame

local t = f:CreateTexture(nil, "LOW")
t:SetTexture(texture)
t:SetAllPoints(f)

f.texture = t

f:SetPoint("CENTER", 0, -5)
f:Show()
you're not telling what tex is or t.
  Reply With Quote
10-26-10, 05:08 PM   #3
lilgulps
A Theradrim Guardian
 
lilgulps's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 62
Still not displaying my texture, however when I use UI-Tooltip-Background I see a texture...

Code:
local f = CreateFrame("Frame", nil, UIParent)
f:SetFrameStrata("LOW")
f:SetWidth(200)
f:SetHeight(100)
	
	-- Creating the texture for the frame

local t = f:CreateTexture(nil, "LOW")
t:SetTexture("Interface\\Tooltips\\UI-Tooltip-Background")
t:SetAllPoints(f)

f.texture = t

f:SetPoint("CENTER", 0, -5)
f:Show()
Is there a certain size image that only will load?

If so is there a way to force load in my custom size .tga files?

Edit: Doesn't have to be a texture, i'm just trying to get a picture I created to display in game and having trouble doing so.

Last edited by lilgulps : 10-26-10 at 05:11 PM.
  Reply With Quote
10-26-10, 05:12 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
all textures must have dimensions that are a power of 2, and must have an alpha channel (ie, 32-bit .tga)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
10-26-10, 05:20 PM   #5
lilgulps
A Theradrim Guardian
 
lilgulps's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 62
EDIT: Nvm... I feel stupid now, thanks for the help

Last edited by lilgulps : 10-26-10 at 05:24 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Images In Frames?? Help :D

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off