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,062
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 04-14-11, 01:24 PM  
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 784
File comments: 150
Uploads: 14
Good to see you back Neal And this addon, is the best one
Last edited by Aftermathhqt : 04-14-11 at 01:25 PM.
Report comment to moderator  
Reply With Quote
Unread 04-14-11, 03:37 PM  
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view AddOns

Forum posts: 284
File comments: 67
Uploads: 2
Originally posted by Game92
Good to see you back Neal And this addon, is the best one
+1!
Report comment to moderator  
Reply With Quote
Unread 04-14-11, 06:57 PM  
Porsha
A Black Drake

Forum posts: 88
File comments: 104
Uploads: 0
Awesome to see you back Neal! Lovely this is a download on its own now with a "How To"...I know many will LOVE it!
Report comment to moderator  
Reply With Quote
Unread 04-14-11, 08:51 PM  
pekaziz
A Kobold Labourer
 
pekaziz's Avatar

Forum posts: 0
File comments: 126
Uploads: 0
Omg, mark the calenders for today, I'm so happy to see you're back Neal.
Report comment to moderator  
Reply With Quote
Unread 04-15-11, 08:56 AM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
Oooh the border shadows are new methinks?
Report comment to moderator  
Reply With Quote
Unread 04-15-11, 09:06 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 10
"methinks" ? Oo
Report comment to moderator  
Reply With Quote
Unread 04-15-11, 09:18 AM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
Is there a way I can make the border shadow span out a bit more? Right now it just looks like a colored line around my border. I'd like to make the shadow thicker.
Report comment to moderator  
Reply With Quote
Unread 04-15-11, 11:27 AM  
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view AddOns

Forum posts: 784
File comments: 150
Uploads: 14
The new version, doens't really work propper, as the old one


----> new version <----

http://img135.imageshack.us/img135/2...1511190919.jpg

----> old version <-------

http://img703.imageshack.us/img703/3...1511191135.jpg

and btw the code looks abit funnie like;

http://img850.imageshack.us/img850/3157/40566686.png

how you remove it; -> top right x, top right] y

http://img52.imageshack.us/img52/4407/be2.png
Report comment to moderator  
Reply With Quote
Unread 04-15-11, 04:43 PM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 10
should now work correct

Originally posted by Toran
Is there a way I can make the border shadow span out a bit more? Right now it just looks like a colored line around my border. I'd like to make the shadow thicker.
Open the !Beautycase.lua file and go to line ~80
Code:
if (borderSize >= 10) then
   space = 3
else
   space = borderSize/3.5
end
change the space (like 4 or 5)
Last edited by Neal : 04-16-11 at 12:53 AM.
Report comment to moderator  
Reply With Quote
Unread 04-16-11, 08:07 AM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
Originally posted by Neal
should now work correct



Open the !Beautycase.lua file and go to line ~80
Code:
if (borderSize >= 10) then
   space = 3
else
   space = borderSize/3.5
end
change the space (like 4 or 5)
That didn't do it - instead created a padding space between the beautycase border and the shadow.
Report comment to moderator  
Reply With Quote
Unread 04-16-11, 12:20 PM  
Sniffles
A Black Drake
 
Sniffles's Avatar
AddOn Author - Click to view AddOns

Forum posts: 86
File comments: 75
Uploads: 17
You should add a 4. function to create white borders. So you can see the colors better (e.g. colored Debuff Borders).
__________________
Hi!
Report comment to moderator  
Reply With Quote
Unread 04-16-11, 12:38 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 Sniffles
You should add a 4. function to create white borders. So you can see the colors better (e.g. colored Debuff Borders).
Code:
for i = 1, 8 do
        self.Border[i]:SetTexture()
end
Ah got a new idea...

BorderTexture(YourTexturehere.tga)



Originally posted by rakkarage
when i try (in _DevPad)

ColorBorderShadow(Minimap, 0, 1, 0);

like in the screenshot, it says

!Beautycase:Invalid frame!

it says that for all the frames i have tried so far...?
thanks
Args! Must check this tomorrow :-/
Last edited by Neal : 04-16-11 at 12:44 PM.
Report comment to moderator  
Reply With Quote
Unread 04-17-11, 08:51 AM  
rakkarage
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 19
File comments: 50
Uploads: 2
Args! Must check this tomorrow :-/
i i needed to do the created first i think
Report comment to moderator  
Reply With Quote
Unread 04-17-11, 10:50 AM  
Neal
A Defias Bandit
 
Neal's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 300
Uploads: 10
And I search and search but don't understand the problem because all worked fine.. -.-
Last edited by Neal : 04-17-11 at 10:51 AM.
Report comment to moderator  
Reply With Quote
Unread 04-17-11, 09:08 PM  
flexe
A Defias Bandit
AddOn Compiler - Click to view compilations

Forum posts: 3
File comments: 7
Uploads: 1
Hello Neal,

I was wondering if you could give possible examples of being able to apply Beautycase to frames created by kgpanels, I have tried without success to apply your borders to Recount, Shadowed Unit Frames and also kgpanel frames.

Since the frames are created dymanically by these addons, it seems each time I have tried to link Beautycase up, it has returned an error saying the frame isint found, or in recount's case, it just didnt like it.

The way I tried to do it was simply creating a new addon, following your instructions of making sure it had loaded after kgpanels, but it still wasnt abel to find the name, even after trying what I named the panel through the addon, and also the actual frame name that the mouse over macro provides.

Im not fairly fluent with lua but I do have prior coding experience with other languages, so I could say im fairly confident that I tried all methods I thought would work, its probably something Im just completely overlooking and any examples would be appreciated

Thanks in advance.
Last edited by flexe : 04-17-11 at 09:08 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: