WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   kgPanels buttons are not hiding (https://www.wowinterface.com/forums/showthread.php?t=54050)

Tonyleila 07-27-16 08:53 PM

kgPanels buttons are not hiding
 
A while ago humfras created this cool kgPanels script for my UI. I created some buttons in kgPanel and they only show up if you hoover them with your mouse. This buttons have text and a tooltip that explain what they do. I don't know it my problems are an error in kgPanels itself or with the script so:
Problem 1: The buttons are not hidden any more they are always shown I guess the onload self:SetAlpha(0) dosen't work?
Problem 2: The buttons are not transperent any more, I have set up the color in the AddOn to 50% but it shows up in 100%. I but this one is a problem with kgPanels.

The rest of this script works as it shoud I can still hide/show dominos bars with it text displays on mouseover etc.

Example:

DOMINOS BUTTON 5:
____________________
ON LOAD
____________________
Code:

self:Show()
self:SetAlpha(0)

self.frame = Dominos.Frame:Get(5)

self.defaultFadeAlpha = Dominos.db.profile.frames[5].fadeAlpha
self.defaultAlpha = Dominos.db.profile.frames[5].alpha or 1

self.oldExpAlpha = Dominos.Frame.GetExpectedAlpha
self.newExpAlpha = function(frame) return self.defaultAlpha end

if self.frame.sets.leilanofade then
local f = self.frame
f.GetExpectedAlpha = self.newExpAlpha
f:UpdateAlpha()
end

if GetLocale() == "deDE" then self.tooltip = [[
|cff00bfffLinks-Klick:|r
1. Verstecke Aktionsleiste 5
2. Leiste 5 bei Mouseover

|cff00bfffRechts-Klick:|r
1. Zeige Aktionsleiste 5
2. Leiste 5 bei Mouseover
]]
else self.tooltip = [[
|cff00bfffLeft-Click:|r
1. Hide Action Bar 5
2. Bar 5 on Mouseover

|cff00bfffRight-Click:|r
1. Show Action Bar 5
2. Bar 5 on Mouseover
]]
end

____________________
ON ENTER
____________________
Code:

self:SetAlpha(1)

GameTooltip:SetOwner(self, "ANCHOR_NONE")
GameTooltip:SetPoint("BOTTOM", self, "TOP", 0, -1)
GameTooltip:SetText(self.tooltip, 1, 1, 1)

____________________
ON LEAVE
____________________
Code:

self:SetAlpha(0)

GameTooltip:Hide()

____________________
ON CLICK
____________________
Code:

if pressed then
local f = self.frame
if button == "RightButton" then
if f.GetExpectedAlpha == self.oldExpAlpha then
  f.GetExpectedAlpha = self.newExpAlpha
  f:UpdateAlpha()
  self.frame.sets.leilanofade = true
else
  f.GetExpectedAlpha = self.oldExpAlpha
  f:UpdateAlpha()
  self.frame.sets.leilanofade = false
end
return
end
if InCombatLockdown() then return end
if f:IsVisible() then
f:Hide();
else
f:Show();

end
end



All times are GMT -6. The time now is 10:08 AM.

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