1. #1
    Field Marshal infamousX's Avatar
    Join Date
    Oct 2012
    Location
    Draenor
    Posts
    60

    kgPanels + Skada

    Hey there! I've searched around a bit but unfortunately couldn't find anything addressing this issue on wowinterface, reddit, or here on mmo-champion.

    In this example, it shows my kgPanels frame, which is anchored and parented to Skada, along with an empty Skada frame.
    This is an example of the same kgPanels and Skada frames, but with full Skada bars. I have set the max number of bars on Skada to 7.

    The problem here is that kgPanels will still show my "SkadaFrame" panel when no bars are active in Skada. The only time the panel will properly hide is when all of Skada is toggled or hidden.

    Is there a way, either through custom scripts or adding custom lua, to make it so my kgPanels "SkadaFrame" will grow along with the Skada bars? (ex: 3/7 Skada bars in use will show the panel up to the 3rd bar. If another player joins, the panel will grow to 4/7 along with Skada.)

    Thanks in advance!

  2. #2
    You could try having different panels for different group sizes, and set up scripts for each one based on group size, and change the code wording slightly on each panel to show or hide based on events. Something like:
    OnLoad script

    Code:
    self:RegisterEvent("PLAYER_ENTERING_WORLD")
    self:RegisterEvent("PARTY_MEMBERS_CHANGED")
    self:RegisterEvent("RAID_ROSTER_UPDATE")
    OnEvent script:
    Code:
    local pmems = GetNumPartyMembers()
     local rmems = GetNumRaidMembers()
     if (pmems < 1 and rmems < 1) or (pmems > 0 and pmems < 6 and rmems < 6) then
        self:Hide()
     else
        self:Show()
     end
    I am Jack's Minimalistic ElvUI.

  3. #3
    Wouldn't it be easier to just add borders to the skada bars so you don't need the background panel for borders around each bar ?

    just search in bardisplay.lua and search for the line "bar.text=barlabel" and paste this under it. it will ad a 1 pixel border around each bar so you wont need the kgpanel.

    Code:
    				--- insert this ---
    				if not bar.bg then
    					local frame = CreateFrame("Frame", nil, bar)
    					frame:ClearAllPoints()
    					frame:SetPoint("TOPLEFT", bar, "TOPLEFT", -1, 1)
    					frame:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", 1, -1)
    					frame:SetBackdrop({
    						edgeFile = [=[Interface\ChatFrame\ChatFrameBackground]=], edgeSize = 1,
    						bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=],
    						insets = {left = 1, right = 1, top = 1, bottom = 1}})
    					frame:SetFrameLevel(bar:GetFrameLevel())
    					frame:SetBackdropColor(0, 0, 0, .3)
    					frame:SetBackdropBorderColor(0, 0, 0)
    					bar.bg = frame
    				end
    --- end ---
    Last edited by Destiria; 2014-08-21 at 10:05 AM.

  4. #4
    Field Marshal infamousX's Avatar
    Join Date
    Oct 2012
    Location
    Draenor
    Posts
    60
    Quote Originally Posted by Destiria View Post
    Wouldn't it be easier to just add borders to the skada bars so you don't need the background panel for borders around each bar ?

    just search in bardisplay.lua and search for the line "bar.text=barlabel" and paste this under it. it will ad a 1 pixel border around each bar so you wont need the kgpanel.

    Code:
    				--- insert this ---
    				if not bar.bg then
    					local frame = CreateFrame("Frame", nil, bar)
    					frame:ClearAllPoints()
    					frame:SetPoint("TOPLEFT", bar, "TOPLEFT", -1, 1)
    					frame:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", 1, -1)
    					frame:SetBackdrop({
    						edgeFile = [=[Interface\ChatFrame\ChatFrameBackground]=], edgeSize = 1,
    						bgFile = [=[Interface\ChatFrame\ChatFrameBackground]=],
    						insets = {left = 1, right = 1, top = 1, bottom = 1}})
    					frame:SetFrameLevel(bar:GetFrameLevel())
    					frame:SetBackdropColor(0, 0, 0, .3)
    					frame:SetBackdropBorderColor(0, 0, 0)
    					bar.bg = frame
    				end
    --- end ---
    Awesome! I will test this and see if it works. Thank you very much! (:

  5. #5
    You're welcome. Hopefully it worked out for you.

  6. #6
    High Overlord
    Join Date
    Jul 2012
    Location
    UK
    Posts
    149
    "bar.text=barlabel" doesn't seem to exist in the latest version of skada. Do you have a line number so I can check I'm not going insane and just missing it?

  7. #7
    Line 324 for me. YOu could just try to add it anywhere under the -- Initialization of bars line. Also must be in the Bardisplay.lua Not Skada.LUA

  8. #8
    High Overlord
    Join Date
    Jul 2012
    Location
    UK
    Posts
    149
    With a fresh install of skada that line doesn't exist. But, I tested the code within the bardisplay.lua after initialization of bars line and it worked so thanks for the snippet!

  9. #9
    Field Marshal infamousX's Avatar
    Join Date
    Oct 2012
    Location
    Draenor
    Posts
    60
    Quote Originally Posted by Destiria View Post
    You're welcome. Hopefully it worked out for you.
    Worked perfectly! Thank you so much!

    - - - Updated - - -

    Oh, 1 more thing while I have you here (if it's not too much trouble), would it be possible to have the "Title bar" in Skada hide until mouseover? I like having the buttons and the text telling me which mode I'm in, but I'd rather not see it until I choose to. I have my Prat addon do the same thing for the "ChatTab" module.

    Hope you can help! Thanks!

  10. #10
    I have no idea to be honest. I only know very basic lua. Maybe someone else here knows

  11. #11
    Field Marshal infamousX's Avatar
    Join Date
    Oct 2012
    Location
    Draenor
    Posts
    60
    Quote Originally Posted by Destiria View Post
    I have no idea to be honest. I only know very basic lua. Maybe someone else here knows
    Oh, okay! Thanks anyway, you were a big help. Hoping to take a class to learn LUA very soon myself

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •