WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Images In Frames?? Help :D (https://www.wowinterface.com/forums/showthread.php?t=36279)

lilgulps 10-26-10 04:43 PM

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?

Ferous 10-26-10 04:57 PM

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.

lilgulps 10-26-10 05:08 PM

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.

Seerah 10-26-10 05:12 PM

all textures must have dimensions that are a power of 2, and must have an alpha channel (ie, 32-bit .tga)

lilgulps 10-26-10 05:20 PM

EDIT: Nvm... I feel stupid now, thanks for the help


All times are GMT -6. The time now is 08:43 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI