Added click-through plumbing and click-through support to Rep/XP Bars

This commit is contained in:
Hendrik Leppkes
2009-01-20 13:10:51 +01:00
parent 6d9c184d97
commit ef9968ce8e
12 changed files with 59 additions and 2 deletions
+17 -1
View File
@@ -8,7 +8,7 @@ local Bar = Bartender4.Bar.prototype
local barregistry = Bartender4.Bar.barregistry
-- option utilty functions
local optGetter, optSetter, visibilityGetter, visibilitySetter, customEnabled, customDisabled, customCopy
local optGetter, optSetter, visibilityGetter, visibilitySetter, customEnabled, customDisabled, customCopy, clickThroughVis
do
local getBar, optionMap, callFunc
-- maps option keys to function names
@@ -18,6 +18,7 @@ do
fadeout = "FadeOut",
fadeoutalpha = "FadeOutAlpha",
fadeoutdelay = "FadeOutDelay",
clickthrough = "ClickThrough",
}
-- retrieves a valid bar object from the barregistry table
@@ -74,6 +75,11 @@ do
local bar = getBar(info[2])
bar:CopyCustomConditionals()
end
function clickThroughVis(info)
local bar = getBar(info[2])
return (not bar.ClickThroughSupport)
end
end
local _, class = UnitClass("player")
@@ -124,6 +130,16 @@ function Bar:GetOptionObject()
get = optGetter,
set = optSetter,
},
clickthrough = {
order = 200,
name = L["Click-Through"],
desc = L["Disable any reaction to mouse events on this bar, making the bar click-through."],
type = "toggle",
get = optGetter,
set = optSetter,
hidden = clickThroughVis,
width = "full",
},
},
},
visibility = {