From 2c4331338765fc545a38cd3c2ab767f67312c38e Mon Sep 17 00:00:00 2001 From: Repooc Date: Mon, 25 Mar 2013 06:40:45 -0400 Subject: [PATCH] Added tooltip option --- ElvUI_SLE/config/profile.lua | 1 + ElvUI_SLE/modules/marks/flares.lua | 10 +++++----- ElvUI_SLE/modules/marks/options.lua | 12 ++++++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ElvUI_SLE/config/profile.lua b/ElvUI_SLE/config/profile.lua index 18aca2e..e3a5316 100755 --- a/ElvUI_SLE/config/profile.lua +++ b/ElvUI_SLE/config/profile.lua @@ -209,6 +209,7 @@ P['sle'] = { ['growth'] = "RIGHT", ['showinside'] = false, ['size'] = 20, + ['tooltips'] = true, }, --UI Buttons diff --git a/ElvUI_SLE/modules/marks/flares.lua b/ElvUI_SLE/modules/marks/flares.lua index a351e86..8b7c152 100644 --- a/ElvUI_SLE/modules/marks/flares.lua +++ b/ElvUI_SLE/modules/marks/flares.lua @@ -37,23 +37,23 @@ function RF:SetupButton(button, flare) button.tex:Point('BOTTOMRIGHT', button, 'BOTTOMRIGHT', -2, 1) if button == f1 then button.tex:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_6") - button:SetScript("OnEnter", function(self) GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Square World Marker"); GameTooltip:Show() end) + button:SetScript("OnEnter", function(self) if (E.db.sle.flares.tooltips==true) then GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Square World Marker"); GameTooltip:Show() end end) button:SetScript("OnLeave", function(self) GameTooltip:Hide() end) elseif button == f2 then button.tex:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_4") - button:SetScript("OnEnter", function(self) GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Triangle World Marker"); GameTooltip:Show() end) + button:SetScript("OnEnter", function(self) if (E.db.sle.flares.tooltips==true) then GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Triangle World Marker"); GameTooltip:Show() end end) button:SetScript("OnLeave", function(self) GameTooltip:Hide() end) elseif button == f3 then button.tex:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_3") - button:SetScript("OnEnter", function(self) GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Diamond World Marker"); GameTooltip:Show() end) + button:SetScript("OnEnter", function(self) if (E.db.sle.flares.tooltips==true) then GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Diamond World Marker"); GameTooltip:Show() end end) button:SetScript("OnLeave", function(self) GameTooltip:Hide() end) elseif button == f4 then button.tex:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_7") - button:SetScript("OnEnter", function(self) GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Cross World Marker"); GameTooltip:Show() end) + button:SetScript("OnEnter", function(self) if (E.db.sle.flares.tooltips==true) then GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Cross World Marker"); GameTooltip:Show() end end) button:SetScript("OnLeave", function(self) GameTooltip:Hide() end) elseif button == f5 then button.tex:SetTexture("INTERFACE/TARGETINGFRAME/UI-RaidTargetingIcon_1") - button:SetScript("OnEnter", function(self) GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Star World Marker"); GameTooltip:Show() end) + button:SetScript("OnEnter", function(self) if (E.db.sle.flares.tooltips==true) then GameTooltip:SetOwner(self, "ANCHOR_CURSOR"); GameTooltip:ClearLines(); GameTooltip:AddLine("Star World Marker"); GameTooltip:Show() end end) button:SetScript("OnLeave", function(self) GameTooltip:Hide() end) end end diff --git a/ElvUI_SLE/modules/marks/options.lua b/ElvUI_SLE/modules/marks/options.lua index c9719fa..d0c086a 100755 --- a/ElvUI_SLE/modules/marks/options.lua +++ b/ElvUI_SLE/modules/marks/options.lua @@ -127,8 +127,16 @@ E.Options.args.sle.args.flares = { get = function(info) return E.db.sle.flares.showinside end, set = function(info, value) E.db.sle.flares.showinside = value; RF:UpdateVisibility() end }, - size = { + tooltips = { order = 7, + type = "toggle", + name = L["Show Tooltip"], + disabled = function() return not E.db.sle.flares.enabled end, + get = function(info) return E.db.sle.flares.tooltips end, + set = function(info, value) E.db.sle.flares.tooltips = value; end + }, + size = { + order = 8, type = "range", name = L['Size'], desc = L["Sets size of buttons"], @@ -138,7 +146,7 @@ E.Options.args.sle.args.flares = { set = function(info, value) E.db.sle.flares.size = value; RF:FrameButtonsGrowth(); RF:FrameButtonsSize() end, }, growth = { - order = 8, + order = 9, type = "select", name = L["Direction"], desc = L["Change the direction of buttons growth from the square marker"], -- 1.7.9.5