Thread Tools Display Modes
03-10-12, 04:27 PM   #1
h9rst
A Murloc Raider
Join Date: Jul 2011
Posts: 8
!beautycase and grid

hello,is there a way to add borders to grid with beautycase?
i always became errors...

can anyone help me?
and i have 1 question.
is there an bag addon with sorting function that i can "skin" with beautycase?



(sorry for my english,im from germany)
  Reply With Quote
03-10-12, 10:53 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I don't know about Beautycase, but here is the code I use to add borders to Grid in my UI; since Neal based Beautycase on the border code I posted years ago anyway, it shouldn't be too hard to modify it:

Code:
local function noop() end

local function Grid_SetBackdropBorderColor(f, r, g, b, a)
	if a and a == 0 then
		f:SetBorderColor()
	else
		f:SetBorderColor(r, g, b)
	end
end

local function Grid_AddBorder(f)
	if not f.SetBorderColor then
		f:SetBorderSize(0.1)
		PhanxBorder.AddBorder(f)
		f.SetBackdropBorderColor = Grid_SetBackdropBorderColor
		f.SetBorderSize = noop
	end
end

for frame in pairs(GridFrame.registeredFrames) do
	Grid_AddBorder(_G[frame])
end

local o = GridFrame.RegisterFrame
GridFrame.RegisterFrame = function(self, f)
	o(self, f)
	Grid_AddBorder(f)
end
The "PhanxBorder.AddBorder(f)" line is the one you would need to change to call the Beautycase function that adds a border to a frame.
  Reply With Quote
03-11-12, 05:30 AM   #3
h9rst
A Murloc Raider
Join Date: Jul 2011
Posts: 8
First thank you for youre reply.
i changed PhanxBorder.AddBorder(f) to CreateBorderLight(f)
but now it gave me following error "attempt to index global 'GridFrame' (a nil value)"

What i am doing wrong?
  Reply With Quote
03-11-12, 05:41 AM   #4
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by h9rst View Post
First thank you for youre reply.
i changed PhanxBorder.AddBorder(f) to CreateBorderLight(f)
but now it gave me following error "attempt to index global 'GridFrame' (a nil value)"

What i am doing wrong?

Put CreateBorder(frame, .....) In GridFrame.lua Line 189.

Put ColorBorder(self, color.r, color.g, color.b) In GridFrame.lua Line 609.

Put ColorBorder(self, .25, .25, .25) In GridFrame.lua 695.
  Reply With Quote
03-11-12, 06:13 AM   #5
h9rst
A Murloc Raider
Join Date: Jul 2011
Posts: 8
thanks works like a charm.
but now a got anther problem.
grid dosnt show me de incoming heal layer in the health bar =X
  Reply With Quote
03-11-12, 06:16 AM   #6
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by h9rst View Post
thanks works like a charm.
but now a got anther problem.
grid dosnt show me de incoming heal layer in the health bar =X
no idea ;x dont use grid anymore
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » !beautycase and grid


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