Thread Tools Display Modes
02-16-10, 08:34 AM   #1
JackOnTheMap
A Murloc Raider
Join Date: Feb 2007
Posts: 8
Border textures.

I'm stumped and while I do have a bit of knowledge of oUF setups, I just can not figure this one out. It's probably something so simple I'll facepalm but what the heck.

I'm using a UF that has a glowTex that is making the borders more than particularly fuzzy.
What I really want it a nice, sharp 1px (or 2px) border and for the life of me, I haven't been able to find a texture that will replace the one that the frame is using.
I've taken other textures and renamed them to "glowTex". Changed paths. Nothing I'm trying is working.

Thank you for your time.
  Reply With Quote
02-16-10, 08:47 AM   #2
Bruners
A Flamescale Wyrmkin
 
Bruners's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 125
Please provide either some code or what layout you are using
  Reply With Quote
02-16-10, 10:23 AM   #3
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
Easiest and best way in my experience is too make a backdrop.. it's not good if you wanna use a layout with transparent bars though.

like brunis said provide some code and it would be easier to help out

here's an example of how to make the backdrop..

Code:
self:SetBackdrop{
bgFile = "Interface\\ChatFrame\\ChatFrameBackground", tile = true, tileSize = 16,
insets = {left = -1, right = -1, top = -1, bottom = -1},
}
self:SetBackdropColor(0,0,0)
  Reply With Quote
02-17-10, 03:04 AM   #4
Taroven
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 49
Might be best to just ask in the comments of the layout in question, or PM the author.

In oUF_Taroven, which does use that same glowTex you've mentioned, there's two points where you can change things up.

1: In the locals segment at the beginning of oUF_Taroven.lua. Added a couple comments to help.
Code:
local glowtex = mediapath.."glowTex"
-- Note: mediapath.. is a concatenation, that line actually reads...
-- local glowtex = "Interface\\AddOns\\oUF_Taroven\\media\\glowTex"
2: Down where the glowtex is actually used.
Code:
self.FrameBackdrop = CreateFrame("Frame", nil, self)
	self.FrameBackdrop:SetPoint("TOPLEFT", self, "TOPLEFT", -4, 4)
	self.FrameBackdrop:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 4, -4)
	self.FrameBackdrop:SetFrameStrata("BACKGROUND")
	self.FrameBackdrop:SetBackdrop {
		edgeFile = glowtex, edgeSize = 5,
		insets = {left = 3, right = 3, top = 3, bottom = 3}
	}	
	self.FrameBackdrop:SetBackdropColor(0, 0, 0, 0)
	self.FrameBackdrop:SetBackdropBorderColor(0, 0, 0)
	self.FrameBackdrop:SetAlpha(0.6)
Make sure you adjust the insets and edgeSize once you manage to get the texture changed. For most borders, insets of a quarter the edgeSize work pretty well.

I've bolded the portion where the texture is set for ya.
__________________
Former author of EventHorizon Continued and Other Releases.
  Reply With Quote
02-17-10, 09:25 AM   #5
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by Taroven View Post
Might be best to just ask in the comments of the layout in question, or PM the author.

In oUF_Taroven, which does use that same glowTex you've mentioned, there's two points where you can change things up.

1: In the locals segment at the beginning of oUF_Taroven.lua. Added a couple comments to help.
Code:
local glowtex = mediapath.."glowTex"
-- Note: mediapath.. is a concatenation, that line actually reads...
-- local glowtex = "Interface\\AddOns\\oUF_Taroven\\media\\glowTex"
2: Down where the glowtex is actually used.
Code:
self.FrameBackdrop = CreateFrame("Frame", nil, self)
	self.FrameBackdrop:SetPoint("TOPLEFT", self, "TOPLEFT", -4, 4)
	self.FrameBackdrop:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 4, -4)
	self.FrameBackdrop:SetFrameStrata("BACKGROUND")
	self.FrameBackdrop:SetBackdrop {
		edgeFile = glowtex, edgeSize = 5,
		insets = {left = 3, right = 3, top = 3, bottom = 3}
	}	
	self.FrameBackdrop:SetBackdropColor(0, 0, 0, 0)
	self.FrameBackdrop:SetBackdropBorderColor(0, 0, 0)
	self.FrameBackdrop:SetAlpha(0.6)
Make sure you adjust the insets and edgeSize once you manage to get the texture changed. For most borders, insets of a quarter the edgeSize work pretty well.

I've bolded the portion where the texture is set for ya.
Why do you create an own frame for the backdrop instead of just adding it to the frame itself (self)?

Also, 4th argument in :SetBackdropColor() is the alpha, so you don't ned :SetAlpha()
  Reply With Quote
02-17-10, 06:31 PM   #6
Taroven
A Cyclonian
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 49
Originally Posted by p3lim View Post
Why do you create an own frame for the backdrop instead of just adding it to the frame itself (self)?

Also, 4th argument in :SetBackdropColor() is the alpha, so you don't ned :SetAlpha()
I had some issues getting it to look right when adding it to the frame itself, said "Screw this", and just made an extra frame. That little extra bit of control does wonders when you're in a hurry. I should probably go fix that.

As for the SetAlpha, it was a quick tweak I made a couple days ago. It was faster to use one SetAlpha than tweak two functions for something I wasn't sure of. I'll be fixing it shortly.

Edit: Ah right. THAT's why I just made a new frame for the backdrop. Less efficient, but it beats the hell out of adjusting every other setpoint in the file.
__________________
Former author of EventHorizon Continued and Other Releases.

Last edited by Taroven : 02-17-10 at 06:59 PM.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Border textures.


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