Add an option to make Omen click-through (non-interactive), defaults off.

This commit is contained in:
Xinhuan
2009-12-24 05:12:03 +08:00
parent 32a9369e18
commit 2bb095b4ba
2 changed files with 21 additions and 0 deletions
+2
View File
@@ -54,6 +54,8 @@ However, player pets on |cffffff78Passive|r mode do not have a threat table, and
When a player pet is instructed to |cffffff78Follow|r, the pet's threat table is wiped immediately and stops attacking, although it may immediately reacquire a target based on its Aggressive/Defensive mode.
]]
L["Click Through"] = true
L["Makes the Omen window non-interactive"] = true
L["Autocollapse"] = true
L["Autocollapse Options"] = true
L["Grow bars upwards"] = true
+19
View File
@@ -66,6 +66,7 @@ local defaults = {
IgnorePlayerPets = true,
FrameStrata = "3-MEDIUM",
ClampToScreen = true,
ClickThrough = false,
Background = {
Texture = "Blizzard Parchment",
BorderTexture = "Blizzard Dialog",
@@ -496,6 +497,7 @@ function Omen:PLAYER_LOGIN()
self:UpdateBackdrop()
self:UpdateTitleBar()
self:UpdateGrips()
self:UpdateClickThrough()
self:UpdateRaidClassColors()
self:ClearAll()
self:UnregisterEvent("PLAYER_LOGIN")
@@ -633,6 +635,8 @@ function Omen:OnProfileChanged(event, database, newProfileKey)
self:ReAnchorLabels()
self:UpdateBarLabelSettings()
self:UpdateBarTextureSettings()
self:UpdateClickThrough()
self:UpdateRaidClassColors()
self:UpdateFuBarSettings()
-- These remainder settings were not placed in functions
-- and were just updated directly from the config code.
@@ -1201,6 +1205,11 @@ function Omen:UpdateBarTextureSettings()
end
end
function Omen:UpdateClickThrough()
self.Title:EnableMouse(not db.ClickThrough)
self.BarList:EnableMouse(not db.ClickThrough)
end
-----------------------------------------------------------------------------
-- Omen event functions
@@ -2095,6 +2104,16 @@ Omen.Options = {
Omen:UpdateBars()
end,
},
ClickThrough = {
type = "toggle",
name = L["Click Through"],
desc = L["Makes the Omen window non-interactive"],
order = 12,
set = function(info, value)
db.ClickThrough = value
Omen:UpdateClickThrough()
end,
},
AutocollapseGroup = {
type = "group",
name = L["Autocollapse Options"],