From 2bb095b4ba1efba54ebb75a6e6e733d0daa26cd4 Mon Sep 17 00:00:00 2001 From: Xinhuan Date: Thu, 24 Dec 2009 05:12:03 +0800 Subject: [PATCH] Add an option to make Omen click-through (non-interactive), defaults off. --- Localization/enUS.lua | 2 ++ Omen.lua | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Localization/enUS.lua b/Localization/enUS.lua index 79f4cd4..7a6dcfe 100644 --- a/Localization/enUS.lua +++ b/Localization/enUS.lua @@ -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 diff --git a/Omen.lua b/Omen.lua index ecec158..3966b60 100644 --- a/Omen.lua +++ b/Omen.lua @@ -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"],