05-03-07, 03:07 PM | #1 |
Graphic issue skinning my UI
I got a nice setup and I wanted to add a background skin to encompass all the action buttons n what not.
Took XArt and modded it a little bit and it works for the most part, but I am getting a strange occurance. Here is the code used Code:
--[[ Full credits of the textures go to nbistudio from ui.worldofwar.net! Description: Adds a texture at the bottom of the UI and moves the Minimap and right ActionBars. ]] XArt = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceDB-2.0", "AceConsole-2.0") function XArt:OnInitialize() self:RegisterDB("XArtDB") self:RegisterChatCommand({"/xart"}) end function XArt:OnEnable() self:CreateArtFrame() self:AlignTexture() end function XArt:OnDisable() self.frame:Hide() self.frame = nil end function XArt:CreateArtFrame() self.frame = CreateFrame("Frame", "XArtFrame", UIParent) self.frame:SetFrameStrata("BACKGROUND") self.frame:EnableMouse(false) self.frame:SetMovable(false) self.frame:SetWidth(1280) self.frame:SetHeight(1024) self.frame:ClearAllPoints() self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 0, 0) --draw the top for i=1,5 do self["art1"..i] = self.frame:CreateTexture("$parentArt"..i,"BACKGROUND") self["art1"..i]:SetWidth(256) self["art1"..i]:SetHeight(512) self["art1"..i]:SetTexture("Interface\\Addons\\XArt\\Textures\\overlay1"..i) self["art1"..i]:ClearAllPoints() if i == 1 then self["art1"..i]:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0) else self["art1"..i]:SetPoint("TOPLEFT", self["art1"..i-1], "TOPRIGHT", 0, 0) end self["art1"..i]:Show() end --draw the bottom for j=1,5 do self["art2"..j] = self.frame:CreateTexture("$parentArt"..j,"BACKGROUND") self["art2"..j]:SetWidth(256) self["art2"..j]:SetHeight(512) self["art2"..j]:SetTexture("Interface\\Addons\\XArt\\Textures\\overlay2"..j) self["art2"..j]:ClearAllPoints() if j == 1 then self["art2"..j]:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0) else self["art2"..j]:SetPoint("BOTTOMLEFT", self["art2"..j-1], "BOTTOMRIGHT", 0, 0) end self["art2"..j]:Show() end self.frame:Show() end function XArt:AlignTexture() self.frame:SetScale(UIParent:GetWidth()/1280) end How is displays incorrectly I basically made an image in Photoshop, added an alpha channel, sliced it into 256x512 panels, 10 in total and basically tile them onto the screen. For some reason the bottm left 4 panels will not appear. And not just there, ANYWHERE i try to draw those 4 panels they do no appear. It very very strange. I would tell the program to draw panel overlay21.tga EVERYWHERE, and nothing appears. Of course, I figure I may have screwed something up when chopping my main file, so I re chopped, it. Same results, only those 4 panels do not draw. Double checked their alpha and it good. I would love to get this working as it was not very difficult to get started and arrange. I've also invcluded a link to a rar of all the tga texture panels incase someone can see something I'm missing. texture files Thanks d |
|
05-03-07, 03:28 PM | #2 |
You are overwriting the top textures with the bottom ones. Each texture needs its own place into the table. Change this:
Code:
--draw the bottom for j=1,5 do self["art2"..j] = self.frame:CreateTexture("$parentArt"..j,"BACKGROUND") self["art2"..j]:SetWidth(256) self["art2"..j]:SetHeight(512) self["art2"..j]:SetTexture("Interface\\Addons\\XArt\\Textures\\overlay2"..j) self["art2"..j]:ClearAllPoints() if j == 1 then self["art2"..j]:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0) else self["art2"..j]:SetPoint("BOTTOMLEFT", self["art2"..j-1], "BOTTOMRIGHT", 0, 0) end self["art2"..j]:Show() end Code:
--draw the bottom for j=6, 10 do self["art2"..j] = self.frame:CreateTexture("$parentArt"..j,"BACKGROUND") self["art2"..j]:SetWidth(256) self["art2"..j]:SetHeight(512) self["art2"..j]:SetTexture("Interface\\Addons\\XArt\\Textures\\overlay2"..j-5) self["art2"..j]:ClearAllPoints() if j == 6 then self["art2"..j]:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0) else self["art2"..j]:SetPoint("BOTTOMLEFT", self["art2"..j-1], "BOTTOMRIGHT", 0, 0) end self["art2"..j]:Show() end Last edited by ravagernl : 05-03-07 at 03:35 PM. |
|
05-03-07, 04:47 PM | #3 |
Already tried that. Double checked it just to be sure, but I had that same code commented out.
I don't think it has anything to do with somehting being over written. I also tried setting both drawing loops to load the same tile sets into memory. overlay1x.tga solely, then overlay2x.tga soley. When loading overlay1x, all tiles of overlay1x appeared and were drawn in their correct positions. In the place where overlay2x would draw on the bottom, the overlay1 tiles where there as expected. When loadsing overlay2x, only overlay25 will appear in the upperright and lowerright positions, the right 1/5 (256 pixels) only. All the others do not appear. Resaved the tgas and was sure to follow the same exact steps on cropping and saving repeated above with the same results. Driving me buggy. |
|
05-03-07, 04:49 PM | #4 |
you could use dicord art, probably be faster
http://discord.tetzfiles.com/ you need dicord library too
__________________
Funtoo - Plan 9 - Windows 7 |
|
05-03-07, 05:17 PM | #5 |
LOL!!!
dude, all I did was unzip all of the discord stuff, opened the game and everything I had just programmed worked, there was the skin! made this code change and nothing still happened, unzip discord, and all was well. Thank you very much. Code:
function XArt:CreateArtFrame() self.frame = CreateFrame("Frame", "XArtFrame", UIParent) self.frame:SetFrameStrata("BACKGROUND") self.frame:EnableMouse(false) self.frame:SetMovable(false) self.frame:SetWidth(1280) self.frame:SetHeight(1024) self.frame:ClearAllPoints() self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", 0, 0) --load all the 10 texture tiles for i=1,10 do self["art"..i] = self.frame:CreateTexture("$parentArt"..i,"BACKGROUND") self["art"..i]:SetWidth(256) self["art"..i]:SetHeight(512) self["art"..i]:SetTexture("Interface\\Addons\\XArt\\Textures\\overlay"..i) end --draw the screen for i=1,10 do self["art"..i]:ClearAllPoints() if i < 6 then -- draw the top if i == 1 then self["art"..i]:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0) else self["art"..i]:SetPoint("TOPLEFT", self["art"..i-1], "TOPRIGHT", 0, 0) end else --draw the bottom if i == 6 then self["art"..i]:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, 0) else self["art"..i]:SetPoint("BOTTOMLEFT", self["art"..i-1], "BOTTOMRIGHT", 0, 0) end end self["art"..i]:Show() end self.frame:Show() end |
|
WoWInterface » Developer Discussions » Graphics Help » Graphic issue skinning my UI |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|