From 4653d66f040dc5f034d0ce968466b1f6da64f96e Mon Sep 17 00:00:00 2001 From: Ackis Date: Fri, 21 Nov 2008 17:41:35 +0000 Subject: [PATCH] Move the scaling tooltips down a level in the config, do the same with the frame remembering stuff --- ARLConfig.lua | 8 ++++---- ARLFrame.lua | 16 ++++++++-------- AckisRecipeList.lua | 11 +++++++---- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/ARLConfig.lua b/ARLConfig.lua index 7f7c92b..2fcd88f 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -1073,9 +1073,9 @@ local function fullOptions() max = 1.5, step = .05, bigStep = .05, - get = function() return addon.db.profile.uiscale end, + get = function() return addon.db.profile.frameopts.uiscale end, set = function( info, v ) - addon.db.profile.uiscale = v + addon.db.profile.frameopts.uiscale = v if ( addon.Frame ) then addon.Frame:SetScale( v ) end end, }, @@ -1088,9 +1088,9 @@ local function fullOptions() max = 1.5, step = .05, bigStep = .05, - get = function() return addon.db.profile.tooltipscale end, + get = function() return addon.db.profile.frameopts.tooltipscale end, set = function( info, v ) - addon.db.profile.tooltipscale = v + addon.db.profile.frameopts.tooltipscale = v if ( arlTooltip ) then arlTooltip:SetScale( v ) end if ( arlTooltip2 ) then arlTooltip:SetScale( v ) end end, diff --git a/ARLFrame.lua b/ARLFrame.lua index f72a740..169b15f 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -3141,12 +3141,12 @@ end local function SaveFramePosition() - local p = self.db.profile + local opts = self.db.profile.frameopts local _, _, _, offsetx, offsety = addon.Frame:GetPoint() - p.offsetx = offsetx - p.offsety = offsety + opts.offsetx = offsetx + opts.offsety = offsety end @@ -3274,7 +3274,7 @@ function addon:CreateFrame( addon.Frame:ClearAllPoints() - local p = self.db.profile + local opts = self.db.profile.frame -- Anchor frame to ATSW if (ATSWFrame) then @@ -3287,7 +3287,7 @@ function addon:CreateFrame( else - addon.Frame:SetPoint("CENTER", UIParent, "CENTER", p.offsetx, p.offsety) + addon.Frame:SetPoint("CENTER", UIParent, "CENTER", opts.offsetx, opts.offsety) end @@ -4231,9 +4231,9 @@ function addon:CreateFrame( ARL_DD_Sort.initialize = ARL_DD_Sort_Initialize -- reset the scale - addon.Frame:SetScale(addon.db.profile.uiscale) - arlTooltip:SetScale(addon.db.profile.tooltipscale) - arlTooltip2:SetScale(addon.db.profile.tooltipscale) + addon.Frame:SetScale(addon.db.profile.frameopts.uiscale) + arlTooltip:SetScale(addon.db.profile.frameopts.tooltipscale) + arlTooltip2:SetScale(addon.db.profile.frameopts.tooltipscale) -- We'll be in "ExpandAll" mode to start with. Make sure the button knows that: ARL_ExpandButton:SetText(L["EXPANDALL"]) diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 180bf6c..037f570 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -137,9 +137,14 @@ function addon:OnInitialize() self.db:RegisterDefaults( { profile = { + -- Frame options - offsetx = 0, - offsety = 0, + frameopts = { + offsetx = 0, + offsety = 0, + uiscale = 1, + tooltipscale = .9, + }, -- Sorting Options sorting = L["Skill"], @@ -149,8 +154,6 @@ function addon:OnInitialize() includeexcluded = false, closeguionskillclose = false, ignoreexclusionlist = false, - uiscale = 1, - tooltipscale = .9, -- Recipe Exclusion exclusionlist = {}, -- 1.7.9.5