Thread Tools Display Modes
05-04-14, 07:52 AM   #1
Nechrit
A Defias Bandit
Join Date: May 2012
Posts: 2
oUF Phanx border texture

Hello fellow oUF users!

I've been using oUF Phanx for ages now, since i installed it i never looked back, so i'll take the chance to thank the author for making my raiding-life so easy

Let's get to the hot point now. I recently changed my UI textures to something with "thinner" and cleaner borders, which caused the unit frames/auras borders to be abit...well it just doesn't match at all!

I post you a picture to give you the idea:

http://postimg.org/image/hoi8lr1mx/full/

Here's the question: Is there a way to change that to a more clean look?

Thanks alot.
Regards,
Nechrit
  Reply With Quote
05-04-14, 11:35 AM   #2
Malakahh
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 30
I believe you're able to change the border thickness and color in the options menu for oUF_Phanx. If you want a custom border texture, I think you'd have to modify the code. I believe the function you would need to modify is
Lua Code:
  1. function ns.CreateBorder(self, size, offset, parent, layer)

which can be found in oUF_Phanx\Features\Border.lua

Alternatively, you could modify the texture it loads (oUF_Phanx\Media\SimpleSquare.blp).

Disclaimer: I haven't tried modifying oUF_Phanx aside from placement of the different frames. I don't know the consequences of modifying these files, nor if these are the correct ones. This is based on a quick look at the code ^^
  Reply With Quote
05-04-14, 08:01 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If you just want a 1px black border, you can just replace the texture with a transparent one. The frames actually have solid black backgrounds, and a 1px padding around all sub-objects (eg. bars) so if you remove the visible border texture, there's already a 1px "border" underneath it.

1. Open Photoshop, GIMP, etc. MS Paint will not work. If you don't have an image editor already, GIMP is free.
2. Create a new image 32 pixels wide by 32 pixels high with a transparent background.
3. Save your transparent square as a TGA file named "SimpleSquare.tga" in the same folder as the existing "SimpleSquare.blp" file.
4. Delete or rename the "SimpleSquare.blp" file. In the addon, the file is only referred to by path and name, without an extension, so you don't need to worry about converting your TGA image to the BLP format, you just need to make sure it's the only image file named "SimpleSquare" in that folder.

The problem with this approach, however, is that I use the border to display threat/aggro and dispellable debuffs. If you still want to see these statuses, you'll need to do more work, and there are several options, the easiest two of which would probably be:

1. Leave the texture alone, and modify the UpdateBorder function (in Functions.lua) to show the border only when a status is active, but hide it otherwise. You could also replace the border texture with a flat border style if you want; just keep the filled-in region about the same size, and use the in-game border size control, otherwise you'll need to do a lot more code editing to get the placement right.
Code:
	if color then
		self:SetBackdropBorderColor(color[1], color[2], color[3], 1, glow and ns.config.borderGlow)
	else
		self:SetBackdropBorderColor(0, 0, 0, 0)
	end
	for pos, tex in pairs(self.BorderTextures) do
		self.BorderTextures[i]:SetShown(not not color)
	end
2. Modify the threat and dispel highlight elements (in Frames.lua) to have actual objects instead of updating the border color, eg.
Code:
	self.DispelHighlight = self.overlay:CreateTexture(nil, "OVERLAY")
	self.DispelHighlight:SetAllPoints(true)
	self.DispelHighlight:filter = true
This will cause the health bar to be highlighted instead of the border. Do the same for the threat element, just after this in the code.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
05-09-14, 10:17 AM   #4
Nechrit
A Defias Bandit
Join Date: May 2012
Posts: 2
I did try the simple .tga file method and it doesnt work, or well it does but i cannot get the border to be thinnier than 12px (also in-game options appear to be limited), looking very thick as off now, so much i cannot see power bar!
How can i sort this out?


Thanks alot for the help guys, much appreciated!
  Reply With Quote
05-09-14, 07:23 PM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
If your new border texutre is overlapping any part of the frame, that means you filled in areas that were not filled in in the original texture. Either fix your texture so it doesn't fill in any areas outside of the original fill areas, or figure out the necessary math to work with your new texture and edit the code in the SetBorderSize function in Features\Border.lua to slice and position the texture appropriately.

If you have no coding experience, I'd recommend simply being more careful with your texture coloring. If you want a thinner border, here's an example of how you might do that, the black being the original border and the red being the area you should color in on your texture:



Also, when you're describing graphical problems, it's usually a good idea to include a screenshot so the people trying to help you can be sure they're helping you with the actaul problem you're having, rather than the problem they imagine you're having based on a written description.
Attached Images
 
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF Phanx border texture


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