Hi all!!.
I have a big dude.
I dont know if Kgpanels can do that, for that reason I ask here:
Can Kgpanels detect when I mouseover another frame?.
Or an alternative, mix a panel with a frame, if I mouseover the frame, its like I mouseover both elements, the panel and the frame.
For example:
I have a panel with a code "x", and a Databroker.
when I mouseover the frame of the Databroker, the panel of Kgpanels react and for example change the color.
I explain what I need and why:
Since 4 days, now when I click the frame of StatBlock_Folks (Friends), appear a pop-up in the middle of the screen (the default, Blizzard bloked that addon action only avaliable for....).
I need a way that when I mouseover StatBlockCore_Folks_Friend or Friend frame of Blizz is open the text change the color.
I can do both with a kgpanel with that codes:
OnLoad:
Code:
local font,size = self.text:GetFont()
self.text:SetFont(font,size,"OUTLINE")
self.text:SetJustifyH("CENTER")
self.text:SetJustifyV("CENTER")
local _, class = UnitClass("player")
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
self.text:SetTextColor(color.r, color.g, color.b)
self:RegisterEvent("PLAYER_LOGIN")
self:RegisterEvent("FRIENDLIST_UPDATE")
OnEvent:
Code:
local bnTotal, bnCount = BNGetNumFriends()
local fTotal, fCount = GetNumFriends()
local total = bnCount+fCount
self.text:SetText(string.format("Friends: |cffffffff%d/%d|r", fCount + bnCount, fTotal + bnTotal))
OnEnter:
Code:
self.entered = true
OnLeave:
Code:
self.entered = false
OnUpdate:
Code:
local bnTotal, bnCount = BNGetNumFriends()
local fTotal, fCount = GetNumFriends()
local total = bnCount+fCount
if self.entered or FriendsListFrame:IsShown() then
self.text:SetText(string.format("|cffffffffFriends:%d/%d|r", fCount + bnCount, fTotal + bnTotal))
else
self.text:SetText(string.format("Friends:|cffffffff%d/%d|r", fCount + bnCount, fTotal + bnTotal))
end
OnClick:
Code:
if pressed then
ToggleFriendsFrame()
end
So basically I remplace the par of the text of the broker with a panel of KgPanels, and fix both problems, now when I click the panel I hace 0 pop-ups, and when I mouseover the panel or open the friends frame, the text change the color.
So I need 2 ways to apply that:
1st: Put the panel behind the frame of StatBloclCore_Folks_Friends, remove the text of the broker, remove the function that toggle the friends frame (and cause problems), and detect when I mouseover the frame of DataBroker (for show the tooltip of the databroker, that works very good), and in the other hand make the efect of change the color on mouseover.
2nd: Mix both frames, remove the text of StatBloclCore_Folks_Friends and remove the function that toggle the friends frame (and cause problems), so when I mouseover or click the frame of StatBloclCore_Folks_Friends I do it in the frame of The broker, and in the panel of Kgpanels.
Sorry for the long post.
And thanks!!!