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=45860)

Viryz 02-20-13 11:05 AM

!Beautycase
 
Hi everyone. I have a a question about !beautycase. I'm not very good with code but I am always experimenting with them. However, The latest code seem to skin everything by default, Am I correct?



As you can see, I've got unwanted borders on Omen and Recount where I prefer to use kgpanels.

So 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.

Tim 02-20-13 01:36 PM

I don't have that mod so I can't tell you where to edit but, go into the probably the main file and search for CreateBorder('skada') or something regarding the skada name as well as stuff with the omen name. Comment those lines out by placing 2 hyphens at the start of the line.

ie: Change
Code:

CreateBorder('some_skada_name', parameters)
CreateBorder('some_omen_name', parameters)

into
Code:

-- CreateBorder('some_skada_name', parameters)
-- CreateBorder('some_omen_name', parameters)


semlar 02-20-13 04:03 PM

After line 258-260 (if (self.HasBeautyBorder) then return end), try putting something like
Lua Code:
  1. local ignored = { Omen = 1, Recount = 1 }
  2. local name = self.GetName and self:GetName()
  3. if name and ignored[name] then self.HasBeautyBorder = true return end
I'm not sure if the frames are actually called "Omen" and "Recount", but you can check with /framestack.

If it works, you can move the "ignored" table outside the function (above it) so it doesn't have to create it every time the function is run.

Viryz 02-20-13 05:31 PM

Thanks so much for responding. So this is what I wrote:

Lua Code:
  1. if (self.HasBeautyBorder) then
  2.         return
  3.     end
  4.    
  5. local ignored = { OmenBarList = 1, RecountMainWindow = 1 }
  6. local name = self.GetName and self:GetName()
  7.     if name and ignored[name] then self.HasBeautyBorder = true
  8.         return
  9.     end
  10.    
  11.     local uL2, uR1, uR2, bL1, bL2, bR1, bR2 = ...
  12.     if (uL1) then
  13.         if (not uL2 and not uR1 and not uR2 and not bL1 and not bL2 and not bR1 and not bR2) then
  14.             uL2, uR1, uR2, bL1, bL2, bR1, bR2 = uL1, uL1, uL1, uL1, uL1, uL1, uL1
  15.         end
  16.     end

Sadly, without results. The results came back as all of the borders were gone on pretty much everything.
Did I write something incorrect?

I would really like to get this working, Thanks again!

semlar 02-20-13 05:48 PM

You did it right, I dry coded it so I'll try it in-game later and figure out what the problem is.

Viryz 02-20-13 06:02 PM

Thanks for the effort, I really do appreciate everything. Take your time :)

semlar 02-20-13 06:13 PM

Actually, looking over their description of it, it sounds like each frame has to be registered with beautycase to be affected by it; I had assumed it just modified all the frames on the screen.

Cirax is right, all you should have to do is find wherever the borders are being created and remove them.

Viryz 02-20-13 06:34 PM

Aw that sucks, like searching for a needle in the hay :P

Thanks for looking this over, nonetheless.

semlar 02-20-13 06:48 PM

Well, it shouldn't really be that hard to find if you know what addon is using beautycase to skin your windows.

However, if you can't identify what's calling it, you might as well stop it at the source.

Try replacing the CreateBorder function in beautycase around line 356 with this..
Lua Code:
  1. local ignored = { OmenBarList = 1, Recount_MainWindow = 1 }
  2. function CreateBorder(self, borderSize, R, G, B, uL1, ...)
  3.     local name = self.GetName and self:GetName()
  4.     if name and ignored[name] then return end
  5.     ApplyBorder(self, borderSize, R, G, B, uL1, ...)
  6. end

I'm not sure about omen's name but you were missing an underscore in recount's.

Edit: Actually, I tried the exact code I suggested earlier and it also works (just changing the recount name), so I'm not sure what the problem was for you. Can you post what addons you're using, or if you know which addon is actually skinning the windows just that one.

I'm guessing you inadvertently added or removed something you shouldn't have while modifying the code, turn on lua errors in-game under interface -> help -> display lua errors.

Viryz 02-20-13 07:22 PM

Thanks alot for all the effort, Semlar. Ever since I read your post #7, I started looking over every single addon more or less. And I did find some code regarding recount and omen. But it took me some time to find!
You were right, I just deleted the code and It works fine now.

Again, thanks!

edit: guess Cirax wants little credit as well :-)

Tim 02-20-13 07:31 PM

Pft, give me all of it since I was the first reply. :P

I decided to download NeavUI since that's the whole ui package for beautycase and was wondering. Are you using his nCore folder and/or his skins.lua?

Viryz 02-20-13 08:19 PM

Yeah. I think they're from his addon pack.

Tim 02-20-13 09:29 PM

Very easy solution then.

Go into the nCore folder and open skins.lua
At the top of the file you will see
Code:

    if (IsAddOnLoaded('Omen')) then
        if (not OmenBarList.beautyBorder) then
            OmenBarList:CreateBeautyBorder(11)
            OmenBarList:SetBeautyBorderPadding(3)
        end
    end

Comment that out by doing:
Code:

--[[
    if (IsAddOnLoaded('Omen')) then
        if (not OmenBarList.beautyBorder) then
            OmenBarList:CreateBeautyBorder(11)
            OmenBarList:SetBeautyBorderPadding(3)
        end
    end
]]--

At the bottom of the file you will see:
Code:

    if (IsAddOnLoaded('Recount')) then
        if (not Recount.MainWindow.beautyBorder) then
            Recount.MainWindow:CreateBeautyBorder(12)
            Recount.MainWindow:SetBeautyBorderPadding(2, -10, 2, -10, 2, 2, 2, 2)
            Recount.MainWindow:SetBackdrop({
                bgFile = 'Interface\\Buttons\\WHITE8x8',
                insets = { left = 0, right = 0, top = 10, bottom = 0 },
            })
            Recount.MainWindow:SetBackdropColor(0, 0, 0, 0.5)
        end
    end

Comment that out by doing:
Code:

--[[
    if (IsAddOnLoaded('Recount')) then
        if (not Recount.MainWindow.beautyBorder) then
            Recount.MainWindow:CreateBeautyBorder(12)
            Recount.MainWindow:SetBeautyBorderPadding(2, -10, 2, -10, 2, 2, 2, 2)
            Recount.MainWindow:SetBackdrop({
                bgFile = 'Interface\\Buttons\\WHITE8x8',
                insets = { left = 0, right = 0, top = 10, bottom = 0 },
            })
            Recount.MainWindow:SetBackdropColor(0, 0, 0, 0.5)
        end
    end
]]--


semlar 02-20-13 09:34 PM

Except with omen, not skada.

Tim 02-20-13 10:58 PM

Doh, yeah, lol.

I'll edit the previous post since omen is located in the file with the proper stuff.


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

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