Needs Graphics Help regarding frame level and layers.
Hi all,
So, I was trying to create unit frame layout with oUF that I saw somewhere (but can't remember where it was) and stuck with frame level and layer issues. Here's what I have done so far. Lua Code:
and here's the image link of what it does. <JPG> I was thinking to use "SetFrameStrata", "SetFrameLevel" and so on, but I have been told from someone that it is very risky to use them on many frames. Quote:
So, I would like to ask how I would simply(?) fix the problem. As long as I can fix this fault, I'm more than happy to re-write the entire code. EDIT: "Power:SetFrameLevel(f.Health:GetFrameLevel() - 1);" and "Power.backdrop:SetFrameLevel(f.Health.backdrop:GetFrameLevel() - 1);" seem to be sending "Power" and "Power.backdrop" back to "Health" and "Health.backdrop". I guess this should be fine, but "Power.backdrop" is still sitting in front of "Health.bg", the background of "Health" status bar. Any advises or tips are welcomd :)!! EDIT 2: Another question apart from this issue. How could I flip StatusBarTexture vertically or horizontally? I have tried Texture:SetTexCoord() thing, but it didn't work :( |
Lua Code:
SetFrameLevel only supports numbers between 0-20 so you also need to make sure to not give it a smaller/bigger numbers. I would also suggest to always use at leas 2 level diferrences between frames due a strata bug in the game, and also you might want to show something between that two frame layers. |
Rotating the image can be done in graphics package like Gimp.
You can extract the WoW image (and code) files by following these instructions. They create the BlizzardInterfaceArt and/or BlizzardInterfaceCode folders under you Wow folder. You can convert the .blp files using Blp2Png or BlPng Converter. Save the rotated images as .tga (the Gimp default settings is all you need) or convert them back to .blp. Copy the rotated image to your addon folder before starting the game, otherwise you will get a green square). Change the path to the image to Interface\\Addons\\your addon\\image file. Edit: If you want to just flip the texture along the x-axis then Texture:SetTexCoord(1 ,0, 0, 1). To flip along the y-axis then Texture:SetTexCoord(0, 1, 1, 0). This is commonly used for a texture file that contains a single image. |
Quote:
No need to convert blp files. Gimp 2 can read them just fine. They are automatically converted to xcf files (the gimp format). Exporting them back to tga format is also easy. If you need help just say so ;) |
What version of Gimp? Using Gimp 2.6.11 I get an unknown file type error trying to open .blp. Is there a plugin required to get it to open .blp files?
Edit: Just took my own link and see Gimp is up to 2.8.16. I feel old :). Edit2: Still failed with 2.8.16 but at least I'm up-to-date. |
Quote:
I've tried your solution and seems like "Health.backdrop" edge is sent behind the "Power" and even "Power.backdrop"... EDIT: Argggg.... nvm. there was another SetFrameLevel under "Power" and "Power.backdrop". Everything is fine now :) |
Quote:
Here's what I have done. Lua Code:
|
Code:
Health:SetStatusBarTexture(STATUSBAR) Looking at the image in the original post though the statas bar texture looks to be just a solid orange square(rectangle). Flipping/Rotating that won't give you any visible difference. Are you instead wanting the status bar to be taller than it is wide and fill from bottom to top? Status bar orientation. |
Quote:
Yes, like you presumed STATUSBAR is a plain white texture. In addition to this, I have forgot to edit the code, but I actually changed this texture to something different which has a shape on it. So, I would like to flip the status bar texture along the y-axis if the frame is for a target's unit frame. |
Code:
local f = CreateFrame("Statusbar") Actually, looking at your setup you might want the x-axis flip from > to < rather than Y-axis which is from ^ to v. X-axis flip will make images "face" each other when placed side by side. |
Quote:
And more about STATUSBAR, it is actually a media that is fetched from LibSharedMedia (LSM). Lua Code:
So, instead of using this variable, I have set statusbar's texture with direct path like you just did, and SetTexCoord() worked on this. Thus, I'm guessing that SetTexCoord() is not compatible with a media that is fetched from LSM. |
Quote:
|
Quote:
What can I say, long day with lots of programming and creating tga files :rolleyes: |
Quote:
Here's screenshot of the texture shape that I used. As you can see, the image isn't symmetrical vertically or even horizontally. And like I mentioned on previous reply, if I set the texture with its direct path e.g: Lua Code:
, Texture:SetTexCoord works perfectly. However, if I get a path of media after fetching from LibSharedMedia e.g: Lua Code:
, Texture:SetTexCoord starts not working D: |
Quote:
http://www.xnview.com/en/ If you want to edit them, then Photoshop and this plugin: http://www.wowinterface.com/download...Photoshop.html |
Quote:
And at 24euro/month, Photoshop is to expensive for me. Not really to expensive but I would not use it very often. |
Quote:
https://helpx.adobe.com/creative-sui...downloads.html More info: http://www.redmondpie.com/download-a...you-still-can/ |
Quote:
Anyone have ideas regarding this? |
I have to admit I thought SetStatusBarTexture() was just a method that encapsulated Texture:SetTexture which takes either a string path to and image file or r,g,b colour references.
Apparently not, StatusBar:SetStatusBarTexture appears to take either a string path to the image or a reference to an existing image which is presumably what is happening here. If you: Code:
local STATUSBAR = LSM:Fetch("statusbar", "fer33"); |
Quote:
I'vs just tried your method and seems it's not working since STATUSBAR is returning a path to image file not the texture reference :( |
All times are GMT -6. The time now is 08:00 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI