Download
(23Kb)
Download
Updated: 05-12-11 02:49 AM
Pictures
File Info
Updated:05-12-11 02:49 AM
Created:04-14-11 10:33 AM
Downloads:11,078
Favorites:74
MD5:

!Beautycase  Popular! (More than 5000 hits)

Version: 1.1.0
by: Neal [More]

This is a small addon for add fast and efficiently smooth borders to your frames!
You dont need to create a texture for all of your frames annymore. Just this little addon and some code below.
The benefit? The border remains the same, even if the window's size changes. It always looks like it should be.

It's a LUA bases addon. So there are no ingame configurations.

So ok, and how can you use it?

It's quite simple!
!Beautycase has some simple functions.


Create a border

Code:
CreateBorder(myFrame, borderSize, R, G, B, uL1, uL2, uR1, uR2, bL1, bL2, bR1, bR2)
myFrame
-> The name of your frame, It must be a frame not a texture
borderSize
-> The size of the simple square Border. 10-12 looks amazing with the default beautycase texture
R, G, B -> The colors of the Border. r = Red, g = Green, b = Blue
uL1, uL2 -> top left x, top left y
uR1, uR2 -> top right x, top right y
bL1, bL2 -> bottom left x, bottom left y
bR1, bR2 -> bottom right x, bottom right y
Shorter method to add a border with no spacing
Code:
CreateBorder(myFrame, borderSize, r, g, b)
Or simple just one number (x) for the same distance on all corners
Code:
CreateBorder(myFrame, borderSize, r, g, b, x)
Change the border/shadow color

"a" is the alpha, its is an alternative possibility and is not needed
Code:
ColorBorder(self, r, g, b, a)
Code:
ColorBorderShadow(self, r, g, b, a)

Change the border/shadow texture

Why? So when you want to use different textures like a "normal" texture
and a white texture for debuff highlight or as indicator for something
Code:
SetBorderTexture(myFrame, texture.tga)
SetBorderShadowTexture(myFrame, texture.tga)

Get infos about the beautycase border on a frame

Code:
local size, texture, r, g, b, alpha = GetBorderInfo(myFrame)

Try it out und you will see how easy you can add a cool border to your frames!

NEW FEATURES!

Code:
  
    myFrame:CreateBorder(borderSize)
    myFrame:SetBorderSize(borderSize)
    
    myFrame:SetBorderPadding(number or [uL1, uL2, uR1, uR2, bL1, bL2, bR1, bR2])
    
    myFrame:SetBorderTexture(texture)
    myFrame:SetBorderShadowTexture(texture)
    
    myFrame:SetBorderColor(r, g, b)
    myFrame:SetBorderShadowColor(r, g, b)
    
    myFrame:HideBorder()
    myFrame:ShowBorder()
    
    myFrame:GetBorder() - true if has a beautycase border, otherwise false
    
    local borderSize, texture, r, g, b, alpha = myFrame:GetBorderInfo()
Change the texture

You dont like the texture included in !Beautycase? Want your own?
So go into the !Beautycase/media folder and change the textureNormal.tga
file with a file of your choice.

Problems
How or where can i put these code snippets into a file or get to work?

First: DONT'T put the code snippets into the beautycase file.
Create a little addons and put the code in its .lua file.

------------------------------------------------------------

You want to skin the frames of an addon.
For example Pitbull or Omen but you get an error message?
So watch out.

WoW initalize all addon alphabetically.
So when you created a addon like "myAddon" and want
to "CreateBorder(aPitbullFrame, ...)" you can only get an error message because
you want to create a border on a frame which at that time does not exist.

Loading ... !Beautycase
Loading ... aAddon
Loading ... bAddon
Loading ... cAddon
Loading ... myAddon > CreateBorder(aPitbullFrame, ...) > Error. This frame does not exist
Loading ... Omen
Loading ... Pitbull > CreatePitbullUnitFrames
So thats one of the most mistake.
You cannot create a border on a frame that does not exist.

In the example below you must create a addon whose first character must be greater than "p"
The some for Omen and other addons. (z is a good character)

Thats the point why this addon is called !Beautycase and not Beautycase.
Its loaded as one of the first addons so that you can use the !Beautycase functions very early in a addon

------------------------------------------------------------

How can i find out the name of an frame?
Create a macro
/print GetMouseFocus():GetName()
Go over the frame you want to give a border and use this macro

Your frame has no name? Than the only solution is to insert the beautycase
code directly into the source data/function of these addon.

If you have no idea how to do this. Ask other people on the wowi/other ui forums.
There are to many wow addons, so I can't give some help with this problems.
If they have no ideas, you can even try it on the comment function of these addon.

v. 1.1.0

- huge update
- border is now names "self.beautyBorder[i]" to prevent issues with other addons
- do NOT update if you dont need the "new" features!

v. 1.0.3

- new functions
- alpha can now be change
- some non-essential changes

v. 1.0.2

- fix how variables should be handled
Optional Files (0)


Post A Reply Comment Options
Unread 12-08-11, 01:49 PM  
Roham
A Kobold Labourer

Forum posts: 0
File comments: 11
Uploads: 0
Strata

Absolutely LOVE this addon. It's simple and elegant.

Need a hand though! I'm trying to set the strata of the border to just above the Grid2LayoutFrame but I can't find a way to do it.

Currently I'm just using a macro with this:
/script CreateBorder(Grid2LayoutFrame, 11, 0.73, 0.6, 0.6)

Is there a way to modify the strata?

Also, I added this to my custom addon:
Grid2LayoutFrame:CreateBorder(Grid2LayoutFrame, 12, 0.73, 0.6, 0.6)

But it doesn't add the border, not sure why.
Last edited by Roham : 12-08-11 at 01:56 PM.
Report comment to moderator  
Reply With Quote
Unread 11-19-11, 10:21 AM  
tinyu
A Molten Giant
 
tinyu's Avatar
AddOn Author - Click to view AddOns

Forum posts: 837
File comments: 374
Uploads: 13
Message: Interface\AddOns\!Beautycase\!Beautycase.lua:2: unexpected symbol near 'local'
Time: 11/20/11 02:18:07
Count: 1
Stack:
Locals:
__________________
"There's no such thing as too many addons."
Lothaer
Titan Dev Team Member.
Report comment to moderator  
Reply With Quote
Unread 08-18-11, 10:18 PM  
Jonisaurus
An Aku'mai Servant
 
Jonisaurus's Avatar

Forum posts: 35
File comments: 6
Uploads: 0
I'm trying to find a way to add borders to individual grid buttons.
Adding them through a separate mini-addon and the individual frame name (GridLayoutHeader1Button1 I think it's called) doesn't work for me.
(The addon begins with "z", so that can't be the problem).

Do I have to do this through Grid's code itself? Because then I have no idea how to
Report comment to moderator  
Reply With Quote
Unread 08-06-11, 10:29 AM  
ohsoslo
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
AddOns

okay i understand everything that has to do with the defaultUI, but i cant get any frames for addons, i get LUA errors and no frames.

like quarts, i do a /frame for it, enter it into the function just like any other ui element, but i still get another lua error XD


any help appreciated
Report comment to moderator  
Reply With Quote
Unread 07-29-11, 04:21 PM  
Cleaved
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
hey guys

any1 able to write a guide which includes:

editing own addons with !beautycase style
->finding the right line to insert the createborder-command
( big prob for me )
maybe some more stuff

excuse my bad english

any1? pleaaaaassssseeeee?
Report comment to moderator  
Reply With Quote
Unread 07-23-11, 11:15 AM  
Lamebob
A Murloc Raider

Forum posts: 4
File comments: 15
Uploads: 0
does anyone know how to get this to work with the party/raid frames in pitbull 4?
Report comment to moderator  
Reply With Quote
Unread 06-12-11, 04:49 AM  
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 784
File comments: 150
Uploads: 14
Originally posted by Bindii
is there something within the LUA that shows your current target's target??
Atleast for nameplates i know.
Report comment to moderator  
Reply With Quote
Unread 05-23-11, 05:45 PM  
Bindii
A Kobold Labourer
 
Bindii's Avatar

Forum posts: 0
File comments: 125
Uploads: 0
is there something within the LUA that shows your current target's target??
__________________
FROZENWARLOCK
Report comment to moderator  
Reply With Quote
Unread 05-21-11, 03:42 AM  
Krankx
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Anyone can help me out plz ?
For ShadowedUnitFrames: When I do exact the same that Neal said my SUFUnitplayer works but when I enter the SUFUnittarget code I get an error in my chatbox :!Beautycase error: This frame does not exist!
Report comment to moderator  
Reply With Quote
Unread 05-18-11, 03:03 PM  
Timmcc
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Originally posted by Neal
Have you tried http://www.wowinterface.com/download...ftermathh.html ?
I had not, but I will now. That post below turned out to not work after all. Thanks!
Report comment to moderator  
Reply With Quote
Unread 05-10-11, 03:29 PM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 10
Originally posted by Timmcc
Wow, thank you! That worked perfectly! This has helped so much, again thank you.
Have you tried http://www.wowinterface.com/download...ftermathh.html ?
Report comment to moderator  
Reply With Quote
Unread 05-08-11, 04:09 PM  
Timmcc
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Originally posted by Game92
I know how to.

Open ButtonBar.lua.

at like line ~ 238

Code:
	if not LBF then
		for i = 1, #buttons do
			local button = buttons[i]
			if button.icon and self.config.skin.Zoom then
				button.icon:SetTexCoord(0.07,0.93,0.07,0.93)
			elseif button.icon then -- 
				button.icon:SetTexCoord(0,1,0,1)
				CreateBorder(button, 12, 1, 1, 1)
			end
		end
	end
Wow, thank you! That worked perfectly! This has helped so much, again thank you.
Report comment to moderator  
Reply With Quote
Unread 05-08-11, 10:08 AM  
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 784
File comments: 150
Uploads: 14
Originally posted by Timmcc
I for the life of me can't get borders to load around Bartender buttons. I have tried editing the Bartender .LUA and that works but I get spammed with errors. I have also made an addon called Zui and I get an error that the frame doesnt exist when I load my UI. Bartender has a frame for each button and thats what I'm trying to put a border on. Here is the code I'm using:

Code:
CreateBorder(BT4Button1, 12, R, G, B, 1, 1, 1, 1, 1, 1, 1, 1)
I can manually put that in in-game and it does it, just having trouble getting it to load on logging in via a .lua file. It seems like the button frames for bartender dont load when bartender does or something.

Also, if anyone knows a way to simplify putting a border on 36 buttons using the above code I'd be all ears. I have been browsing the internet for about 3 hours and I can't sift through all the information and/or sample veiwing of published books.

Thanks for any responses.
I know how to.

Open ButtonBar.lua.

at like line ~ 238

Code:
	if not LBF then
		for i = 1, #buttons do
			local button = buttons[i]
			if button.icon and self.config.skin.Zoom then
				button.icon:SetTexCoord(0.07,0.93,0.07,0.93)
			elseif button.icon then -- 
				button.icon:SetTexCoord(0,1,0,1)
				CreateBorder(button, 12, 1, 1, 1)
			end
		end
	end
Last edited by Aftermathhqt : 05-08-11 at 10:09 AM.
Report comment to moderator  
Reply With Quote
Unread 05-07-11, 06:01 PM  
Timmcc
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
I for the life of me can't get borders to load around Bartender buttons. I have tried editing the Bartender .LUA and that works but I get spammed with errors. I have also made an addon called Zui and I get an error that the frame doesnt exist when I load my UI. Bartender has a frame for each button and thats what I'm trying to put a border on. Here is the code I'm using:

Code:
CreateBorder(BT4Button1, 12, R, G, B, 1, 1, 1, 1, 1, 1, 1, 1)
I can manually put that in in-game and it does it, just having trouble getting it to load on logging in via a .lua file. It seems like the button frames for bartender dont load when bartender does or something.

Also, if anyone knows a way to simplify putting a border on 36 buttons using the above code I'd be all ears. I have been browsing the internet for about 3 hours and I can't sift through all the information and/or sample veiwing of published books.

Thanks for any responses.
Report comment to moderator  
Reply With Quote
Unread 05-07-11, 09:36 AM  
Gyalwa
A Kobold Labourer

Forum posts: 1
File comments: 5
Uploads: 0
Fantastico^^ Worked fine.
Thank you very much und danke schön
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: