Thread Tools Display Modes
11-26-14, 08:14 AM   #1
chumii
A Fallenroot Satyr
 
chumii's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 23
Beautycase - Second Skada Window

Hi,

I started to use Beautycase for my UI, got all running, but can't figure out one thing: How can I create the border around a second skada window? The "default" one is skinned, I created a new window called "Heal".

Tried this:

Lua Code:
  1. SkadaBarWindowHeal:CreateBeautyBorder(1)
  2.  
  3. SkadaBarWindowHeal:SetBeautyBorderSize(1)
  4. SkadaBarWindowHeal:SetBeautyBorderPadding(1)
  5.  
  6. SkadaBarWindowHeal:SetBeautyBorderTexture('default')
  7. SkadaBarWindowHeal:SetBeautyShadowTexture(texture)
  8.  
  9. SkadaBarWindowHeal:SetBeautyBorderColor(.6, .6, .6)
  10. SkadaBarWindowHeal:SetBeautyShadowColor(.6, .6, .6)
  11.  
  12. SkadaBarWindowHeal:HideBeautyBorder()
  13. SkadaBarWindowHeal:ShowBeautyBorder()
  14.  
  15. SkadaBarWindowHeal:HasBeautyBorder() -- true if has a beautycase border, false if not
  16.  
  17. local borderSize, texture, r, g, b, alpha = SkadaBarWindowHeal:GetBeautyBorderInfo()

But getting this error:

Lua Code:
  1. 1x zzMyBorderAddon\core.lua:1: attempt to index global 'SkadaBarWindowHeal' (a nil value)
  2. zzMyBorderAddon\core.lua:1: in main chunk
  3.  
  4. Locals:

I think the Frame is not called "SkadaBarWindowHeal" but thats what framestack says..

anyone has a solution for that?

edit: and one more.. is it possible that beautycase is blocking some addons to show up their configs under "ESC-Interface" ? I dont even have that Addon-Tab anymore, just everything in one list and BigWigs for example isnt showing the main config... http://puu.sh/d6gvr/6f70d4c649.jpg

Last edited by chumii : 11-26-14 at 08:37 AM.
  Reply With Quote
11-26-14, 09:57 AM   #2
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 583
Not every single addon will place something in the Interface options as it's something an author would have to code support for.

Anyways if your going to skin skada from a secondary addon and not modify skada itself you need to check fr Skada ADDON_LOADED event (or for when the addon itself loads as !Beautycase will load before skada)

Code:
local f = CreateFrame('Frame')
f:RegisterEvent('VARIABLES_LOADED')
f:RegisterEvent('ADDON_LOADED')
f:RegisterEvent('PLAYER_ENTERING_WORLD')

f:SetScript('OnEvent', function(self)
    if (IsAddOnLoaded('Skada')) then
        --Call your !Beautycase functions here
    end
end)
Personally I used this to skin skada though I have never tried it with multiple windows.

Code:
local f = CreateFrame('Frame')
f:RegisterEvent('VARIABLES_LOADED')
f:RegisterEvent('ADDON_LOADED')
f:RegisterEvent('PLAYER_ENTERING_WORLD')

f:SetScript('OnEvent', function(self)
    if (IsAddOnLoaded('Skada')) then
        local OriginalSkadaFunc = Skada.PLAYER_ENTERING_WORLD
        function Skada:PLAYER_ENTERING_WORLD()
            OriginalSkadaFunc(self)

            if (SkadaBarWindowSkada and not SkadaBarWindowSkada.beautyBorder) then
                SkadaBarWindowSkada:CreateBeautyBorder(cfg.border.size.large)
                SkadaBarWindowSkada:SetBeautyBorderTexture(cfg.border.texture)
                SkadaBarWindowSkada:SetBeautyBorderPadding(3)
                SkadaBarWindowSkada:SetBackdrop({
                    bgFile = 'Interface\\Buttons\\WHITE8x8',
                    insets = { left = 0, right = 0, top = 10, bottom = 0 },
                })
                SkadaBarWindowSkada:SetBackdropColor(0, 0, 0, 0.5)
            end
        end
    end
end)
Also just a tip you don't need to call every single !Beautycase function, just the ones you use so all you need is this (based on your current script in the OP)

Code:
SkadaBarWindowHeal:CreateBeautyBorder(1)
 
SkadaBarWindowHeal:SetBeautyBorderSize(1)
SkadaBarWindowHeal:SetBeautyBorderPadding(1)
 
SkadaBarWindowHeal:SetBeautyBorderColor(.6, .6, .6)
SkadaBarWindowHeal:SetBeautyShadowColor(.6, .6, .6)
__________________
Tweets YouTube Website
  Reply With Quote
11-26-14, 10:52 AM   #3
chumii
A Fallenroot Satyr
 
chumii's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 23
Ok, I found my BigWigs config, I was just stupid

But cant get that Beautycase to work... Tried your code, then end up with this

Lua Code:
  1. local f = CreateFrame('Frame')
  2. f:RegisterEvent('VARIABLES_LOADED')
  3. f:RegisterEvent('ADDON_LOADED')
  4. f:RegisterEvent('PLAYER_ENTERING_WORLD')
  5.  
  6. f:SetScript('OnEvent', function(self)
  7.     if (IsAddOnLoaded('Skada')) then
  8.         SkadaBarWindowHeal:CreateBeautyBorder(1)
  9.  
  10.         SkadaBarWindowHeal:SetBeautyBorderSize(1)
  11.         SkadaBarWindowHeal:SetBeautyBorderPadding(1)
  12.  
  13.         SkadaBarWindowHeal:SetBeautyBorderColor(.6, .6, .6)
  14.         SkadaBarWindowHeal:SetBeautyShadowColor(.6, .6, .6)
  15.         print("Test")
  16.     end
  17. end)

Still getting this error

Lua Code:
  1. 2x zzMyBorderAddon\core.lua:8: attempt to index global 'SkadaBarWindowHeal' (a nil value)
  2. zzMyBorderAddon\core.lua:8: in function <zzMyBorderAddon\core.lua:6>
  3.  
  4. Locals:

Test-Print works, so it runs through to the end, but yeah.. SkadaBarWindowHeal doesn't seem to be the correct Frame..

Edit: ok I messed up sth else.. if I replace SkadaBarWindowHeal with SkadaBarWindowSkada I get the same error (with the other Framename ofc) and the default Skada-Window wont have a border too..

Last edited by chumii : 11-26-14 at 10:54 AM.
  Reply With Quote
11-26-14, 10:56 AM   #4
Kkthnx
A Cobalt Mageweaver
 
Kkthnx's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2011
Posts: 247
It should work no matter what on SkadaBarWindowHeal..

You can look here how Neav does his and maybe copy the code?

https://github.com/renstrom/NeavUI/b...ules/skins.lua
__________________
Success isn't what you've done compared to others. Success is what you've done compared to what you were made to do.

Last edited by Kkthnx : 11-26-14 at 11:03 AM.
  Reply With Quote
11-26-14, 11:19 AM   #5
chumii
A Fallenroot Satyr
 
chumii's Avatar
AddOn Compiler - Click to view compilations
Join Date: Jun 2009
Posts: 23
That did it.. thank you very much!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Beautycase - Second Skada Window


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off