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,157
Favorites:65
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 09-16-14, 07:38 PM  
Lightbound
An Aku'mai Servant
 
Lightbound's Avatar
AddOn Author - Click to view AddOns

Forum posts: 34
File comments: 14
Uploads: 1
Changing texture

Hey there!

How can i switch between different textures? If i try:

Code:
CreateBorder (CharacterFrame, 15)
SetBorderTexture(CharacterFrame, textureNormal2.tga)
it gives me this Lua error:

Lua Code:
  1. 2x:2: attempt to index global "texture" (a nil value)
  2. :2: in main chunk
  3.  
  4. Locals:

I did put the textures in a media folder in my addon. Since the !Beauticase command comes out of my addon folder the texture should be used there or in the original folder. Its availabele in both of them .. dont get why its not working.
Lightbound is offline Report comment to moderator  
Reply With Quote
Unread 08-04-14, 02:00 PM  
Slaxi81
A Murloc Raider
 
Slaxi81's Avatar
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 178
Uploads: 3
Re: Font?

Originally Posted by ktrhn
Nice addon! What is the name of the font in the screenshot?
Seems to be "Expressway"
__________________
Slaxi81 is offline Report comment to moderator  
Reply With Quote
Unread 05-15-14, 06:09 PM  
ktrhn
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Question Font?

Nice addon! What is the name of the font in the screenshot?
ktrhn is offline Report comment to moderator  
Reply With Quote
Unread 05-25-13, 03:13 PM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
I'm not finding anything in the !Beautycase.lua file you can safely edit, I'll do some fiddling around with it and see what I can come up with though.
10leej is offline Report comment to moderator  
Reply With Quote
Unread 05-22-13, 08:11 AM  
Jonisaurus
A Fallenroot Satyr
 
Jonisaurus's Avatar

Forum posts: 29
File comments: 6
Uploads: 0
Hey,

first: !Beautycase is an amazing addon, it's my favourite addon of all time!! <3 I use it for everything and it works perfectly with my own texture.

Here is my problem:

Some addons will have higher strata than Beautycase and their corner edges will then cover the Beautycase border.

Here is a picture.

http://i.imgur.com/d2HiLOR.png

As you can see the oUF_Phanx frame behaves curiously. The power bar has higher strata than Beautycase, the HP bar has lower strata.

I'd like to have Beautycase as the highest object at all times because that allows me to edit my own texture to look good with my frames in the corners.

I don't know what to do.
Last edited by Jonisaurus : 05-22-13 at 08:17 AM.
Jonisaurus is offline Report comment to moderator  
Reply With Quote
Unread 05-21-13, 03:53 AM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
Sorry for late reply

Originally Posted by Bloodheir
Hello everyone!

I would like to use this addon but i cant understand how it works.

Without Lua experience im able to use it?

Is there any guide/tutorial how it works?

Any help it should be awesome!
You'll be able to use it, you just have to find addons that support it otherwise you'll have to make your own.

As for a tutorial on how to make such an addon it's actually on the download page itself though I'll assist if I catch your comments in time unlike this one
10leej is offline Report comment to moderator  
Reply With Quote
Unread 05-10-13, 11:37 AM  
Bloodheir
A Deviate Faerie Dragon

Forum posts: 18
File comments: 34
Uploads: 0
Hello everyone!

I would like to use this addon but i cant understand how it works.

Without Lua experience im able to use it?

Is there any guide/tutorial how it works?

Any help it should be awesome!
Bloodheir is offline Report comment to moderator  
Reply With Quote
Unread 05-01-13, 11:57 AM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
Originally Posted by Sparkaoss
Hello somehow to work with Dominos? 3 hours trying and I get tired T_T
I tested 10leej codes for actionbars, raidframes but do not work :S, please help.

Thank you

Sorry for my bad English.
my code only works for the default, dominos creates it's own actionbars.

you can try using Neal's old button facade plugin, but I can't garauntee it'll work.
Last edited by 10leej : 05-01-13 at 01:38 PM.
10leej is offline Report comment to moderator  
Reply With Quote
Unread 04-01-13, 02:23 PM  
Sparkaoss
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Hello somehow to work with Dominos? 3 hours trying and I get tired T_T
I tested 10leej codes for actionbars, raidframes but do not work :S, please help.

Thank you

Sorry for my bad English.
Sparkaoss is offline Report comment to moderator  
Reply With Quote
Unread 03-03-13, 01:04 AM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
Originally Posted by Viryz
I have a few question about !beautycase. I'm not very good with code but I am always experimenting with them. However, This code seem to skin everything by default, correct?

What would I need to do If i wanted to have beautiful borders on everything such as tiptac, minimap and all that except for recount and omen? Been lurking around in the code but can't seem to find any solution, please help.

Thank you.
Actually !Beautycase doesn't skin anything by default. As for skinning thing such as tiptac all you need to do is find the name of the frame (in most cases in the .lua files the name of the frame is simple "frame" as for skinning the minimap !Beautycase can only skin a square so you'll need a square layout for the minimap, more or less something like qMinimap after that all you have to do is add "Minimap:CreateBorder(12,1,1,1)" at the bottom of qMinimap's .lua file.
10leej is offline Report comment to moderator  
Reply With Quote
Unread 02-18-13, 09:58 AM  
Viryz
An Aku'mai Servant
AddOn Compiler - Click to view compilations

Forum posts: 37
File comments: 33
Uploads: 2
I have a few question about !beautycase. I'm not very good with code but I am always experimenting with them. However, This code seem to skin everything by default, correct?

What would I need to do If i wanted to have beautiful borders on everything such as tiptac, minimap and all that except for recount and omen? Been lurking around in the code but can't seem to find any solution, please help.

Thank you.
Viryz is offline Report comment to moderator  
Reply With Quote
Unread 01-22-13, 10:30 PM  
Expunge
A Defias Bandit

Forum posts: 2
File comments: 10
Uploads: 0
Anyone? Still can't manage to make this work.
Expunge is offline Report comment to moderator  
Reply With Quote
Unread 01-16-13, 01:29 AM  
Expunge
A Defias Bandit

Forum posts: 2
File comments: 10
Uploads: 0
Hello kamilo, Neal

I'm trying to put a beautycase on my frames in Shadowed Unit Frames and I don't seem to be having any luck. I've followed the instructions on both of these posts, but I haven't had luck with either. Perhaps an update to SUF has made these methods no longer functional? kamilo's method seems like a very clean solution, and I'd like to stick with that if possible.

Thanks for any help you guys can provide.. I'm going to keep plugging away here.

Originally Posted by kamilo
There is no need to actually modify Shadowed Unit Frames source to load borders (nor manually list frames), you can simply override the function that does all the loading.

After playing around with the SUF internal functions, here's what I came up with, and seems to work with every frame SUF creates:

Code:
-- borders for all SUF Frames

local SUFUnits = ShadowUF.Units
local CreateUnit = SUFUnits.CreateUnit

function SUFUnits.CreateUnit(...)
	local frame = CreateUnit(...)
	CreateBorder(frame, 12, 1, 1, 1)
	return frame
end
Just put this in a new addon and you should be fine.
Originally Posted by Neal
Sorry for doublepost :O

For recount (a AddOn with z as first letter for example)
Code:
CreateBorder(Recount_MainWindow, 11, 1, 1, 1)

For ShadowedUnitFrames

ShadowedUnitFrames.lua ~ line:199:
Code:
function ShadowUF:LoadUnits()

    ... some code here

    CreateBorder(SUFUnitplayer, 11, 1, 1, 1)
    CreateBorder(SUFUnittarget, 11, 1, 1, 1)
    CreateBorder(SUFUnit....)
end
Expunge is offline Report comment to moderator  
Reply With Quote
Unread 12-26-12, 12:04 AM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
Re: Skinning Skada!

Originally Posted by Lvkke
Hello can someone help me to skin Skada? ive tryed to just put CreateBorder(Skada, 12, r, g, b, 1, 1, 1, 1, 1, 1, 1, 1) in the Notepad and the whole addon got messed upp
r,g,b are an example for colors that has to be numbers
10leej is offline Report comment to moderator  
Reply With Quote
Unread 12-26-12, 12:02 AM  
10leej
A Scalebane Royal Guard
 
10leej's Avatar
AddOn Author - Click to view AddOns

Forum posts: 440
File comments: 336
Uploads: 20
These scripts skin the Raid frames and Actionbars (default UI only)

actionbars
Lua Code:
  1. --Skin Actionbars
  2.         if event == "PLAYER_LOGIN" then
  3.             for i = 1, 12 do -- Bar 1
  4.                 CreateBorder(_G["ActionButton" .. i], 12, 1, 1, 1)
  5.             end
  6.             for i = 1, 12 do --Bar 2
  7.                 CreateBorder(_G["MultiBarBottomLeftButton" .. i], 12, 1, 1, 1)
  8.             end
  9.             for i = 1, 12 do --Bar 3
  10.                 CreateBorder(_G["MultiBarBottomRightButton" .. i], 12, 1, 1, 1)
  11.             end
  12.             for i = 1, 12 do --Bar 4
  13.                 CreateBorder(_G["MultiBarLeftButton" .. i], 12, 1, 1, 1)
  14.             end
  15.             for i = 1, 12 do --Bar 5
  16.                 CreateBorder(_G["MultiBarRightButton" .. i], 12, 1, 1, 1)
  17.             end
  18.             for i = 1, 12 do --Bar 5
  19.                 CreateBorder(_G["ExtraBarButton" .. i], 12, 1, 1, 1)
  20.             end
  21.             for i = 1, 10 do --Pet Bar
  22.                 CreateBorder(_G["PetActionButton" .. i], 12, 1, 1, 1)
  23.             end
  24.         end
  25.     end)
  26.     a:RegisterEvent("PLAYER_LOGIN")
  27.     a:RegisterEvent("PLAYER_ENTERING_WORLD")
  28.     a:RegisterEvent("ADDON_LOADED")

raid frames
Lua Code:
  1. --skin default raid frames
  2.     b = CreateFrame("Frame")
  3.     b:SetScript("OnEvent", function(self, event, ...)
  4.         if event == "GROUP_ROSTER_UPDATE" then
  5.             for i = 1, 5 do -- Party Frames
  6.                 CreateBorder(_G["CompactPartyFrameMember" .. i], 12, 1, 1, 1)
  7.             end
  8.             for i = 1, 40 do -- Raid Frames
  9.                 CreateBorder(_G["CompactRaidFrame" .. i], 12, 1, 1, 1)
  10.             end
  11.             for i = 1, 5 do -- Raid Frames
  12.                 CreateBorder(_G["CompactRaidGroup1Member" .. i], 12, 1, 1, 1)
  13.             end
  14.             for i = 1, 5 do -- Raid Frames
  15.                 CreateBorder(_G["CompactRaidGroup2Member" .. i], 12, 1, 1, 1)
  16.             end
  17.             for i = 1, 5 do -- Raid Frames
  18.                 CreateBorder(_G["CompactRaidGroup3Member" .. i], 12, 1, 1, 1)
  19.             end
  20.             for i = 1, 5 do -- Raid Frames
  21.                 CreateBorder(_G["CompactRaidGroup4Member" .. i], 12, 1, 1, 1)
  22.             end
  23.             for i = 1, 5 do -- Raid Frames
  24.                 CreateBorder(_G["CompactRaidGroup5Member" .. i], 12, 1, 1, 1)
  25.             end
  26.         end
  27.     end)
  28.     b:RegisterEvent("PLAYER_LOGIN")
  29.     b:RegisterEvent("GROUP_ROSTER_UPDATE")
  30.     b:RegisterEvent("ADDON_LOADED")
Last edited by 10leej : 12-26-12 at 11:52 PM.
10leej is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: