WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   !Beautycase (https://www.wowinterface.com/forums/showthread.php?t=41563)

Jyces 10-09-11 08:13 PM

!Beautycase
 
I am having huge problems with this addon. Everytime I try to input the code into the addon LUA file (ex. CreateBorder(SUFunitplayer, 12, r, g, b, 1, 1, 1, 1, 1, 1, 1, 1), the addon I am trying to get a border around completely disappears after refreshing the game (using /reload). It is as if the addon disables. I've tried numerous times, with many different addons, and I keep getting the same result. This has become extremely frustrating. What could I be doing wrong?

Ekaterina 10-10-11 03:13 AM

Quote:

Originally Posted by Jyces (Post 245630)
I am having huge problems with this addon. Everytime I try to input the code into the addon LUA file (ex. CreateBorder(SUFunitplayer, 12, r, g, b, 1, 1, 1, 1, 1, 1, 1, 1), the addon I am trying to get a border around completely disappears after refreshing the game (using /reload).

I think you may be passing incorrect arguments to the function.
r, g & b need to be values. And because your corners are all the same you can condense it.

Try:
local r, g, b = 1,1,1
CreateBorder(SUFUnitplayer, 12, r, g, b, 1)

Aftermathhqt 10-10-11 06:26 AM

Quote:

Originally Posted by Jyces (Post 245630)
I am having huge problems with this addon. Everytime I try to input the code into the addon LUA file (ex. CreateBorder(SUFunitplayer, 12, r, g, b, 1, 1, 1, 1, 1, 1, 1, 1), the addon I am trying to get a border around completely disappears after refreshing the game (using /reload). It is as if the addon disables. I've tried numerous times, with many different addons, and I keep getting the same result. This has become extremely frustrating. What could I be doing wrong?

Can i see a picture how this looks? and where you put in that code

Jyces 10-11-11 05:47 PM

I apologize about the delayed response. I honestly forgot I posted this thread.

Quote:

Originally Posted by Ekaterina (Post 245641)
I think you may be passing incorrect arguments to the function.
r, g & b need to be values. And because your corners are all the same you can condense it.

Try:
local r, g, b = 1,1,1
CreateBorder(SUFUnitplayer, 12, r, g, b, 1)

I tried using the code you provided but same outcome. I think it has something to do with me maybe posting the code in the wrong area? For example, say I want to change the border for addon Shadowed Unit Frames. Am I supposed to put the code into "ShadowedUnitFrames.Lua"?

Quote:

Originally Posted by Game92 (Post 245643)
Can i see a picture how this looks? and where you put in that code

When this happens, the addon up disappears. For example, if I was using Shadowed Unit Frames, then I add the code and /reload, it disappears. I cannot even configured it. It is like it is disabled all together.

Ekaterina 10-11-11 07:14 PM

Do you have BugSack installed? Is it showing any lua errors?

Also, could you post your code so that we can see where in the file you are trying to add the border?

Jyces 10-11-11 08:02 PM

Quote:

Originally Posted by Ekaterina (Post 245761)
Do you have BugSack installed? Is it showing any lua errors?

Nope, don't have that addon.

Quote:

Also, could you post your code so that we can see where in the file you are trying to add the border?
I use the example provided in the !Beautycase lua file, which is:
CreateBorder(SUFunitplayer, 12, r, g, b, 1, 1, 1, 1, 1, 1, 1, 1)

When I post this code, I really just put it anywhere in the LUA file. I know I am supposed to put it where the frame I want to change is, but the problem with that is I can never find the unit frame name under the LUA file. For example, I know for a fact that Shadowed Unit Frames player frame is named "SUFunitplayer" because I used a macro/MoveAnything frame finder to find that out, but the word "SUFunitplayer" is not in the LUA file.

Phanx 10-13-11 03:16 AM

Most likely, SUF creates its frames dynamically, and has not created the player frame yet at the time your code is running. It will work when you type the same code in-game because the loading process has completed by then. To solve this issue, you would need to figure out when SUF creates its frames and run your code after that event has fired, or hook the function it runs to create its frames. I don't have time to download SUF and dig through its code at the moment, but if you can't figure it out, maybe someone else more familiar with that addon can help you.

The frame name doesn't appear in the addon's Lua files because it isn't hardcoded. When SUF creates a frame for the "player" unit, it also creates a name, using some predefined pattern like "SUF" + "unit" + <the unit>.

itsjustadrian 10-18-11 10:59 PM

I was recently tinkering with !BeautyCase trying to get it to work with SUF. I was having the same problems so I perused through the comments section of the addon and found this snippet of code.

Code:

-- borders for all SUF Frames

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

function SUFUnits.CreateUnit(...)
        local frame = CreateUnit(...)
        CreateBorder(frame, 10, 1, 1, 1)
        return frame
end

Put that in a new addon (I named mine ZUI since it has to load AFTER SUF and addons load alphabetically).

I have a question of my own concerning BeautyCase however. How do you get it to set up with Raven (buffs addon)? Do you have to create frames for each button for example RavenButton1, RavenButton2, etc. or is there a way to take over functions like Shadowed Unit Frames.

Thanks everyone.


All times are GMT -6. The time now is 02:59 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI