Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(23 Kb)
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:6,306
Favorites:67
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)


Archived Files (1)
File Name
Version
Size
Author
Date
1.0.3
21kB
Neal
04-17-11 02:24 PM


Post A Reply Comment Options
Unread 08-18-11, 10:18 PM  
Jonisaurus
A Fallenroot Satyr
 
Jonisaurus's Avatar

Forum posts: 29
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
Jonisaurus is offline 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
ohsoslo is offline Report comment to moderator  
Reply With Quote
Unread 07-29-11, 04:21 PM  
Cleaved
A Kobold Labourer

Forum posts: 0
File comments: 3
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?
Cleaved is offline Report comment to moderator  
Reply With Quote
Unread 07-23-11, 11:15 AM  
Lamebob
A Kobold Labourer

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

Forum posts: 653
File comments: 705
Uploads: 14
Originally posted by Bindii
is there something within the LUA that shows your current target's target??
Atleast for nameplates i know.
Game92 is offline 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
Bindii is offline 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!
Krankx is offline 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!
Timmcc is offline 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: 15
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 ?
Neal is offline 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.
Timmcc is offline Report comment to moderator  
Reply With Quote
Unread 05-08-11, 10:08 AM  
Game92
A Molten Giant
 
Game92's Avatar
AddOn Author - Click to view AddOns

Forum posts: 653
File comments: 705
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 Game92 : 05-08-11 at 10:09 AM.
Game92 is offline 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.
Timmcc is offline 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
Gyalwa is offline Report comment to moderator  
Reply With Quote
Unread 05-07-11, 09:28 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 15
Re: famBags

Originally posted by Gyalwa
Hi,
I am trying to get some borders to famBags, but with no results...
the frame name is: famBagsFrame, but !Beautycase is not able to find such?!

Any help is appreciated...
Try famBagsLayout.lua:Line 212~

Code:
.....
self.famBagsFrame:Hide()
CreateBorder(self.famBagsFrame, 11, 1, 1, 1)
self.MAINFRAMES['bags'] = self.famBagsFrame
...
Neal is offline Report comment to moderator  
Reply With Quote
Unread 05-07-11, 05:57 AM  
Gyalwa
A Kobold Labourer

Forum posts: 1
File comments: 5
Uploads: 0
famBags

Hi,
I am trying to get some borders to famBags, but with no results...
the frame name is: famBagsFrame, but !Beautycase is not able to find such?!

Any help is appreciated...
Gyalwa is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: