From 6fe6c82f6a02a051c84dc18b2c090fec12e4957d Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 6 Jan 2007 02:00:45 +0000 Subject: [PATCH] Small fixes to ensure the frame/tab switching works properly, resolving issues I just introduced --- PerfectRaid.xml | 2 +- PerfectRaid_Buffs.lua | 2 +- PerfectRaid_Options.lua | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/PerfectRaid.xml b/PerfectRaid.xml index 00b23cf..99d6a04 100644 --- a/PerfectRaid.xml +++ b/PerfectRaid.xml @@ -54,7 +54,7 @@ - HideUIPanel(self:GetParent()); + PerfectRaid:HasModule("PerfectRaid-Options"):ShowOptions() diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua index 0588fe0..b7bd6e6 100644 --- a/PerfectRaid_Buffs.lua +++ b/PerfectRaid_Buffs.lua @@ -68,7 +68,7 @@ end function Buffs:PERFECTRAID_TAB_CHANGED(old,new) if PROptions_Buffs_Edit and PROptions_Buffs_Edit:IsVisible() then - self:CancelEntry() + self.options:FadeOut(PROptions_Buffs_Edit) end end diff --git a/PerfectRaid_Options.lua b/PerfectRaid_Options.lua index 704b003..51601e2 100644 --- a/PerfectRaid_Options.lua +++ b/PerfectRaid_Options.lua @@ -43,14 +43,15 @@ end function Options:ShowOptions() if not PROptions then self:CreateOptions() - PROptions:Show() + self:FadeIn(PROptions) elseif PROptions:IsVisible() then - PROptions:Hide() + self:FadeOut(PROptions) else - PROptions:Show() + self:FadeIn(PROptions) end end +local tabs = {} function Options:CreateOptions() local frame = CreateFrame("Frame", "PROptions", UIParent, "PROptionsTemplate") frame:SetHeight(375) @@ -64,9 +65,11 @@ function Options:CreateOptions() module:CreateOptions(self) end end + PanelTemplates_SetNumTabs(PROptions, #tabs) + PanelTemplates_SetTab(PROptions, 0) + --self:TabOnClick(PROptionsTab1) end -local tabs = {} function Options:AddOptionsTab(title, frame) local num = #tabs + 1 local name = "PROptionsTab"..num @@ -89,9 +92,6 @@ function Options:AddOptionsTab(title, frame) tab.frame:Hide() table.insert(tabs, tab) - PanelTemplates_SetNumTabs(PROptions, num) - PanelTemplates_SetTab(PROptions, 1) - self:TabOnClick(PROptionsTab1) end local FADE_IN_LEN = 0.5 -- 1.7.9.5