Thread Tools Display Modes
09-24-16, 02:13 PM   #1
Maxen
A Fallenroot Satyr
Join Date: Aug 2008
Posts: 23
Borders on Grid 2 (Beautycase)

Hi there,

I was able to make a beautycase border on my grid raid frame but I'm not sure how to make them show border statuses. Something to do with frame level strata I suppose. Looks like it works only when the frame is faded (out of range). Here is a screenshot :



TIA!
  Reply With Quote
09-24-16, 03:48 PM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
It's not actually "working" when the frames are faded, but since setting the frame to 50% opacity means all its child textures are also set to 50% opacity, you can see the "real" border through your Beautycase border.

In order to make it work, you need to:

(1) Remove the "real" borders on the frames. I'm not familiar with the Grid2 codebase, but it's probably something like this:

Code:
local backdrop = frame:GetBackdrop()
backdrop.insets = { left = 0, right = 0, top = 0, bottom = 0 }
frame:SetBackdrop(backdrop)
(2) Hook or replace the function that normally colors the "real" border (probably using SetBackdropBorderColor) and have it apply the color to the Beautycase border instead.

This post about adding borders to Grid may give you some ideas.
__________________
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
09-24-16, 09:38 PM   #3
Maxen
A Fallenroot Satyr
Join Date: Aug 2008
Posts: 23
Nice, thanks! I was able to make it work following your advice. Now, it seems when there is no status indicator, the border is mostly transparent. When there is a status, color is showing, but really too dark. Maybe it's not using the right texture...

No status:


with status (blue):
  Reply With Quote
09-25-16, 10:02 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Your hook function should (1) not pass the status' alpha value on to the Beautycase border, just the r/g/b values, and (2) use the default Beautycase border color instead of the provided status color when there's no status (probably best detected by alpha being 0). Again, see the code in the other thread I linked; my hook function handles both cases correctly.
__________________
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
09-26-16, 05:21 PM   #5
Maxen
A Fallenroot Satyr
Join Date: Aug 2008
Posts: 23
Finally got it, had to play with the textures also. Thanks for the help!

Code:
function Border:OnUpdate(parent, unit, status)
	if status then
		parent:SetBeautyBorderTexture('white')
		parent:SetBeautyBorderColor(status:GetColor(unit))
	else
		parent:SetBeautyBorderTexture('default')
		parent:SetBeautyBorderColor(1,1,1)
	end
end
  Reply With Quote
01-28-17, 07:36 AM   #6
adaroundtown
A Murloc Raider
AddOn Compiler - Click to view compilations
Join Date: Jul 2007
Posts: 5
Hi there. I came across this thread and wanted to ask:
did you put your !beautycase code in a zborders add-on?
any chance you would be able to share your !beautycase code for grid2 and where you put it?
i thought i had mine working, but it doesn't seem to be doing the trick anymore and the zborders file i've got has gotten huge.
any advice would be appreciated.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Borders on Grid 2 (Beautycase)


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