Thread Tools Display Modes
01-12-08, 07:27 AM   #1
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
PitBull frame problem

I got tired of not getting my eePanels around my party frames so i searched around a bit got at last a working code. But as you maybe see im totally new to coding and i was wondering if you guys could find any errors in it because i planned release it. Ive mostly used the addon inside DruktharUI.

Code:
PitBullFrameFixxer = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0")
local PitBullFrameFixxer = PitBullFrameFixxer

function PitBullFrameFixxer:OnInitialize()
  self:RegisterEvent("PARTY_MEMBERS_CHANGED")
  self:RegisterEvent("RAID ROSTER UPDATE", "PARTY_MEMBERS_CHANGED")
  self:RegisterEvent("PLAYER_ENTERING_WORLD")
end

function PitBullFrameFixxer:PLAYER_ENTERING_WORLD()
  eePanel9:SetFrameLevel(0)
  self:PARTY_MEMBERS_CHANGED()
end

function PitBullFrameFixxer:PARTY_MEMBERS_CHANGED()
        if GetNumPartyMembers() < 1 then
            eePanel13:Hide()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 1 then
            eePanel13:Show()
            eePanel14:Hide()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 2 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Hide()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 3 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Hide()
        elseif GetNumPartyMembers() == 4 then
            eePanel13:Show()
            eePanel14:Show()
            eePanel15:Show()
            eePanel16:Show()
   end
end
  Reply With Quote
01-12-08, 07:43 AM   #2
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Can't you just parent your panel to the pitbull frames, so when the pitbull frames hide your panel hides?
  Reply With Quote
01-12-08, 08:23 AM   #3
ReverendD
A Rage Talon Dragon Guard
 
ReverendD's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 343
Originally Posted by Slakah
Can't you just parent your panel to the pitbull frames, so when the pitbull frames hide your panel hides?
This is the easiest way to do it, but at the same time I have had many issues with this not working of late (last 2 months). I always end up just removing the frame cause it will not update its location or hide itself when the frame it is attached to hides.
__________________
"Computers have enabled people to make more mistakes faster than almost any invention in history, with the possible exception of tequila and hand guns" - Mitch Ratcliffe
“A computer once beat me at chess, but it was no match for me at kick boxing” - Emo Phillips
  Reply With Quote
01-12-08, 08:46 AM   #4
Mock
A Black Drake
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 83
It doesnt work for me neither because the pitbull doesnt create the frame before it needs it and it makes different names.(I think...)

But i got a question, how can i hide the frames again when im in a raid?

Edit // Nvm, found it easier to just attach a script to the eePanels.

Last edited by Mock : 01-12-08 at 10:47 AM.
  Reply With Quote
06-14-08, 02:05 PM   #5
leafborn
A Kobold Labourer
Join Date: Apr 2008
Posts: 1
I wold LOVE to know how to do this. I'm having the same problems. My eePanels keep showing on my raid frames. Will that script in the OP fix that? Or will I need to add something else?

Thanks so much!!!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » PitBull frame problem


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