Small fixes to ensure the frame/tab switching works properly, resolving issues I just introduced
James Whitehead II [01-06-07 - 02:00]
Small fixes to ensure the frame/tab switching works properly, resolving issues I just introduced
diff --git a/PerfectRaid.xml b/PerfectRaid.xml
index 00b23cf..99d6a04 100644
--- a/PerfectRaid.xml
+++ b/PerfectRaid.xml
@@ -54,7 +54,7 @@
</Anchors>
<Scripts>
<OnClick>
- HideUIPanel(self:GetParent());
+ PerfectRaid:HasModule("PerfectRaid-Options"):ShowOptions()
</OnClick>
</Scripts>
</Button>
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