diff --git a/PerfectRaid.xml b/PerfectRaid.xml
index 95ad56a..f62faba 100644
--- a/PerfectRaid.xml
+++ b/PerfectRaid.xml
@@ -1,134 +1,90 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
- <Frame name="PROptionsTemplate" hidden="true" virtual="true" moveable="true" enableMouse="true">
+ <Frame name="PROptionsTemplate" movable="true" frameStrata="DIALOG" toplevel="true" hidden="true" parent="UIParent" virtual="true">
+ <Size>
+ <AbsDimension x="500" y="400"/>
+ </Size>
+ <Anchors>
+ <Anchor point="CENTER"/>
+ </Anchors>
+ <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
+ <BackgroundInsets>
+ <AbsInset left="11" right="12" top="12" bottom="11"/>
+ </BackgroundInsets>
+ <TileSize>
+ <AbsValue val="32"/>
+ </TileSize>
+ <EdgeSize>
+ <AbsValue val="32"/>
+ </EdgeSize>
+ </Backdrop>
<Layers>
- <Layer level="BACKGROUND">
- <Texture name="$parentTopLeft" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\TopLeft">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="TOPLEFT"/>
+ <Layer level="ARTWORK">
+ <Texture name="$parentHeaderTexture" file="Interface\DialogFrame\UI-DialogBox-Header">
+ <Size>
+ <AbsDimension x="350" y="64"/>
+ </Size>
+ <Anchors>
+ <Anchor point="TOP">
+ <Offset>
+ <AbsDimension x="0" y="12"/>
+ </Offset>
+ </Anchor>
</Anchors>
</Texture>
- <Texture name="$parentTopRight" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\TopRight">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="TOPRIGHT"/>
- </Anchors>
- </Texture>
- <Texture name="$parentBotLeft" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\BotLeft">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="BOTTOMLEFT"/>
- </Anchors>
- </Texture>
- <Texture name="$parentBotRight" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\BotRight">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="BOTTOMRIGHT"/>
- </Anchors>
- </Texture>
- <Texture name="$parentTop" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\Top">
+ <FontString name="$parentTitle" inherits="GameFontNormal" text="PerfectRaid Options">
<Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMLEFT"/>
- </Anchors>
- </Texture>
- <Texture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\Bot">
- <Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentBotLeft" relativePoint="TOPRIGHT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentBotRight" relativePoint="BOTTOMLEFT"/>
- </Anchors>
- </Texture>
- <Texture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\Left">
- <Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentBotLeft" relativePoint="TOPRIGHT"/>
- </Anchors>
- </Texture>
- <Texture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\Right">
- <Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentTopRight" relativePoint="BOTTOMLEFT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentBotRight" relativePoint="TOPRIGHT"/>
- </Anchors>
- </Texture>
- <Texture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\Bg">
- <Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMRIGHT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentBotRight" relativePoint="TOPLEFT"/>
- </Anchors>
- </Texture>
- <FontString name="$parentTitle" inherits="GameFontHighlightSmall" text="PerfectRaid Configuration">
- <Anchors>
- <Anchor point="CENTER" relativeTo="$parentTop" relativePoint="CENTER">
- <Offset><AbsDimension x="0" y="7"/></Offset>
+ <Anchor point="TOP" relativeTo="$parentHeaderTexture">
+ <Offset>
+ <AbsDimension x="0" y="-14"/>
+ </Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
+ <Frames>
+ <Button name="$parentCloseButton" hidden="false" inherits="UIPanelCloseButton">
+ <Anchors>
+ <Anchor point="TOPRIGHT">
+ <Offset>
+ <AbsDimension x="-5" y="-5"/>
+ </Offset>
+ </Anchor>
+ </Anchors>
+ <Scripts>
+ <OnClick>
+ HideUIPanel(self:GetParent());
+ </OnClick>
+ </Scripts>
+ </Button>
+ </Frames>
<Scripts>
<OnLoad>
- table.insert(UISpecialFrames,self:GetName())
- self.Title = getglobal(self:GetName().."Title")
- local title = self:CreateTitleRegion()
- title:SetPoint("TOPLEFT", self, "TOPLEFT", 5, 0)
- title:SetPoint("TOPRIGHT", self, "TOPRIGHT", -5, 0)
- title:SetHeight(20)
+ local name = self:GetName()
+ table.insert(UISpecialFrames,name)
+ self.Title = getglobal(name.."Title")
</OnLoad>
+ <OnHide>
+ PlaySound("UChatScrollButton");
+ </OnHide>
</Scripts>
</Frame>
- <Button name="PRTabTemplate" hidden="true" virtual="true">
+ <Button name="PRTabTemplate" hidden="false" inherits="CharacterFrameTabButtonTemplate" virtual="true">>
<Size>
- <AbsDimension x="96" y="32"/>
+ <AbsDimension x="115" y="32"/>
</Size>
- <Layers>
- <Layer level="BACKGROUND">
- <Texture name="$parentLeft" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\TabLeftInactive">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="BOTTOMLEFT"/>
- </Anchors>
- </Texture>
- <Texture name="$parentRight" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\TabRightInactive">
- <Size><AbsDimension x="32" y="32"/></Size>
- <Anchors>
- <Anchor point="BOTTOMRIGHT"/>
- </Anchors>
- </Texture>
- <Texture name="$parentMiddle" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\TabMiddleInactive">
- <Anchors>
- <Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
- <Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
- </Anchors>
- </Texture>
- </Layer>
- <Layer level="ARTWORK">
- <FontString name="$parentName" inherits="GameFontHighlightSmall" text="Tab Name">
- <Anchors>
- <Anchor point="CENTER">
- <Offset><AbsDimension x="0" y="3"/></Offset>
- </Anchor>
- </Anchors>
- </FontString>
- </Layer>
- </Layers>
<Scripts>
<OnLoad>
- local name = self:GetName()
- self.Left = getglobal(name.."Left")
- self.Middle = getglobal(name.."Middle")
- self.Right = getglobal(name.."Right")
- self.Name = getglobal(name.."Name")
+ self:SetFrameLevel(2);
</OnLoad>
<OnClick>
PerfectRaid:HasModule("PerfectRaid-Options"):TabOnClick(self)
</OnClick>
</Scripts>
</Button>
- <CheckButton name="PRCheckTemplate" hidden="true" virtual="true">
- <Size><AbsDimension x="20" y="20"/></Size>
- <NormalTexture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\CheckButton"/>
- <CheckedTexture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\CheckButtonChecked"/>
+ <CheckButton name="PRCheckTemplate" hidden="true" inherits="UICheckButtonTemplate" virtual="true">
+ <Size><AbsDimension x="26" y="26"/></Size>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="Check Label">
@@ -172,22 +128,6 @@
</OnValueChanged>
</Scripts>
</Slider>
- <Button name="PRButtonTemplate" virtual="true">
- <Size><AbsDimension x="96" y="32"/></Size>
- <ButtonText name="$parentText"/>
- <NormalFont inherits="GameFontHighlight"/>
- <HighlightFont inherits="GameFontNormal"/>
- <DisabledFont inherits="GameFontDisable"/>
- <NormalTexture inherits="UIPanelButtonDisabledTexture"/>
- <PushedTexture inherits="UIPanelButtonDisabledDownTexture"/>
- <DisabledTexture inherits="UIPanelButtonDisabledTexture"/>
- <HighlightTexture inherits="UIPanelButtonHighlightTexture"/>
- <Scripts>
- <OnLoad>
- self:GetNormalTexture():SetVertexColor(1, .415, .027)
- local name = self:GetName()
- self.Label = getglobal(name.."Text")
- </OnLoad>
- </Scripts>
+ <Button name="PRButtonTemplate" inherits="OptionsButtonTemplate" virtual="true">
</Button>
</Ui>
\ No newline at end of file
diff --git a/PerfectRaid_Aggro.lua b/PerfectRaid_Aggro.lua
index 7d202da..6490464 100644
--- a/PerfectRaid_Aggro.lua
+++ b/PerfectRaid_Aggro.lua
@@ -30,6 +30,7 @@
---------------------------------------------------------------------------]]
local Aggro = PerfectRaid:NewModule("PerfectRaid-Aggro")
+local L = PerfectRaidLocals
local frames,aggro
local victims = {}
@@ -145,13 +146,13 @@ function Aggro:CreateOptions(opt)
table.insert(options.widgets, slider)
local cancel = CreateFrame("Button", "PRAggro_Cancel", options, "PRButtonTemplate")
- cancel.Label:SetText(L["Cancel"])
+ cancel:SetText(L["Cancel"])
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:OnShow() end)
cancel:Show()
local save = CreateFrame("Button", "PRAggro_Save", options, "PRButtonTemplate")
- save.Label:SetText(L["Save"])
+ save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
save:SetScript("OnClick", function() self:SaveOptions() end)
save:Show()
diff --git a/PerfectRaid_Buffs.lua b/PerfectRaid_Buffs.lua
index 35e56ef..735e943 100644
--- a/PerfectRaid_Buffs.lua
+++ b/PerfectRaid_Buffs.lua
@@ -144,19 +144,19 @@ function Buffs:CreateOptions(opt)
self:CreateListFrame(options, 10)
local delete = CreateFrame("Button", "PRBuffs_Delete", options, "PRButtonTemplate")
- delete.Label:SetText(L["Delete"])
+ delete:SetText(L["Delete"])
delete:SetPoint("BOTTOMRIGHT", 0, 5)
delete:SetScript("OnClick", function() self:DeleteEntry() end)
delete:Show()
local edit = CreateFrame("Button", "PRBuffs_Edit", options, "PRButtonTemplate")
- edit.Label:SetText(L["Edit"])
+ edit:SetText(L["Edit"])
edit:SetPoint("BOTTOMRIGHT", delete, "BOTTOMLEFT", -10, 0)
edit:SetScript("OnClick", function() self:EditEntry() end)
edit:Show()
local add = CreateFrame("Button", "PRBuffs_Add", options, "PRButtonTemplate")
- add.Label:SetText(L["Add"])
+ add:SetText(L["Add"])
add:SetPoint("BOTTOMRIGHT", edit, "BOTTOMLEFT", -10, 0)
add:SetScript("OnClick", function() self:AddEntry() end)
add:Show()
@@ -265,20 +265,14 @@ function Buffs:CreateListFrame(parent, num)
end
function Buffs:CreateEditFrame(parent)
- local frame = CreateFrame("Frame", "PROptions_Buffs_Edit", PROptions_Buffs)
+ local frame = CreateFrame("Frame", "PROptions_Buffs_Edit", PROptions)
local name = "PROptions_Buffs_Edit"
-- frame:SetPoint("TOPLEFT", 15, -25)
-- frame:SetPoint("BOTTOMRIGHT", -15, 15)
- frame:SetAllPoints()
+ frame:SetAllPoints(PROptions_Buffs)
frame:SetFrameLevel(frame:GetFrameLevel() + 1)
frame:Hide()
- local bg = frame:CreateTexture(nil, "ARTWORK")
- bg:SetAllPoints()
- bg:SetTexture(0.2, 0.2, 0.2)
-
- PROptions_Buffs:SetScript("OnHide", function() self:CancelEntry() end)
-
local buffname = CreateFrame("EditBox", name.."BuffName", frame, "InputBoxTemplate")
local font = buffname:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
font:SetText(L["Buff Name:"])
@@ -430,20 +424,20 @@ function Buffs:CreateEditFrame(parent)
checks[11]:SetPoint("TOPLEFT", checks[6], "BOTTOMLEFT", 0, -20)
checks[11]:Show()
- for i=12,13 do
+ for i=12,12 do
checks[i] = makeCheck(self.conditions[i])
checks[i]:SetPoint("TOPLEFT", checks[i-1], "TOPRIGHT", 60, 0)
checks[i]:Show()
end
local cancel = CreateFrame("Button", "PRBuffs_EditCancel", PROptions_Buffs_Edit, "PRButtonTemplate")
- cancel.Label:SetText(L["Cancel"])
+ cancel:SetText(L["Cancel"])
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:CancelEntry() end)
cancel:Show()
local save = CreateFrame("Button", "PRBuffs_EditSave", PROptions_Buffs_Edit, "PRButtonTemplate")
- save.Label:SetText(L["Save"])
+ save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
save:SetScript("OnClick", function() self:SaveEntry() end)
save:Show()
@@ -470,6 +464,7 @@ function Buffs:EditEntry()
local options = PROptions_Buffs_Edit
options.editEntry = entry
+ PROptions_Buffs:Hide()
options:Show()
options.buffname:SetText(entry.buffname)
options.groupname:SetText(entry.groupname or "")
@@ -598,6 +593,7 @@ function Buffs:CancelEntry()
local options = PROptions_Buffs_Edit
options:Hide()
options.editEntry = nil
+ PROptions_Buffs:Show()
end
function Buffs:EnableButtons()
@@ -623,10 +619,7 @@ Buffs.conditions = {
["Warlock"] = function(u,c) return c == "WARLOCK" end,
["Mage"] = function(u,c) return c == "MAGE" end,
["Mana"] = function(u,c) return c == "DRUID" or c == "PRIEST" or c == "PALADIN" or c == "SHAMAN" or c == "MAGE" or c == "WARLOCK" or c == "HUNTER" end,
- ["Caster"] = function(u,c) return c == "MAGE" or c == "WARLOCK" or c == "SHAMAN" or c == "DRUID" end,
- ["Melee"] = function(u,c) return c == "WARRIOR" or c == "ROGUE" end,
["Healer"] = function(u,c) return c == "PRIEST" or c == "SHAMAN" or c == "DRUID" or c == "PALADIN" end,
- ["NonTank"] = function(u,c) return c ~= "WARRIOR" end,
}
local work = {}
diff --git a/PerfectRaid_Hacks.lua b/PerfectRaid_Hacks.lua
index ce475bc..88d9e76 100644
--- a/PerfectRaid_Hacks.lua
+++ b/PerfectRaid_Hacks.lua
@@ -30,6 +30,7 @@
---------------------------------------------------------------------------]]
local Hacks = PerfectRaid:NewModule("PerfectRaid-Hacks")
+local L = PerfectRaidLocals
local frames
function Hacks:Initialize()
@@ -71,13 +72,13 @@ function Hacks:CreateOptions(opt)
end)
local cancel = CreateFrame("Button", "PRHacks_Cancel", options, "PRButtonTemplate")
- cancel.Label:SetText(L["Cancel"])
+ cancel:SetText(L["Cancel"])
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:OnShow() end)
cancel:Show()
local save = CreateFrame("Button", "PRHacks_Save", options, "PRButtonTemplate")
- save.Label:SetText(L["Save"])
+ save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
save:SetScript("OnClick", function() self:SaveOptions() end)
save:Show()
diff --git a/PerfectRaid_Options.lua b/PerfectRaid_Options.lua
index 2595f87..ed8a735 100644
--- a/PerfectRaid_Options.lua
+++ b/PerfectRaid_Options.lua
@@ -52,8 +52,8 @@ end
function Options:CreateOptions()
local frame = CreateFrame("Frame", "PROptions", UIParent, "PROptionsTemplate")
- frame:SetHeight(300)
- frame:SetWidth(450)
+ frame:SetHeight(375)
+ frame:SetWidth(600)
frame:SetPoint("CENTER", 0, 0)
for name,module in PerfectRaid:IterateModules() do
@@ -61,12 +61,6 @@ function Options:CreateOptions()
module:CreateOptions(self)
end
end
-
- local button = CreateFrame("Button", "PROptionsClose", PROptions, "UIPanelCloseButton")
- button:SetHeight(25)
- button:SetWidth(25)
- button:SetPoint("TOPRIGHT", -5, 3)
- button:SetScript("OnClick", function() PROptions:Hide() end)
end
local tabs = {}
@@ -74,36 +68,42 @@ function Options:AddOptionsTab(title, frame)
local num = #tabs + 1
local name = "PROptionsTab"..num
local tab = CreateFrame("Button", name, PROptions, "PRTabTemplate")
-
+ tab.idx = num
+
if num == 1 then
- tab:SetPoint("TOPLEFT", PROptions, "BOTTOMLEFT", 10, 12)
+ tab:SetPoint("CENTER", PROptions, "BOTTOMLEFT", 50, -8)
else
local prev = getglobal("PROptionsTab"..num-1)
- tab:SetPoint("TOPLEFT", prev, "TOPRIGHT", 3, 0)
+ tab:SetPoint("TOPLEFT", prev, "TOPRIGHT", -16, 0)
end
- tab.Name:SetText(title)
+ tab:SetText(title)
tab.frame = frame
- local width = tab.Name:GetWidth()
- tab:SetWidth(width + 30)
tab:Show()
+ tab.frame:SetPoint("TOPLEFT", PROptions, "TOPLEFT", 20, -30)
+ tab.frame:SetPoint("BOTTOMRIGHT", PROptions, "BOTTOMRIGHT", -15, 10)
+ tab.frame:Hide()
+
table.insert(tabs, tab)
+ PanelTemplates_SetNumTabs(PROptions, num)
+ PanelTemplates_SetTab(PROptions, 1)
+ self:TabOnClick(PROptionsTab1)
end
local tabselected
function Options:TabOnClick(tab)
if tabselected then
- tabselected.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabLeftInactive")
- tabselected.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabMiddleInactive")
- tabselected.Right:SetTexture("Interface\\AddOns\\Perfectraid\\images\\OrangeTheme\\TabRightInactive")
tabselected.frame:Hide()
end
- tab.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabLeft")
- tab.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabMiddle")
- tab.Right:SetTexture("Interface\\AddOns\\Perfectraid\\images\\OrangeTheme\\TabRight")
- tab.frame:SetPoint("TOPLEFT", 15, -25)
- tab.frame:SetPoint("BOTTOMRIGHT", -15, 15)
tab.frame:Show()
tabselected = tab
+ PanelTemplates_SetTab(PROptions, tab.idx)
end
+
+--[[
+Cide: local dialogBackdrop = { bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
+[5:51pm] Cide: edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
+[5:51pm] Cide: tile = true, tileSize = 32, edgeSize = 32,
+[5:51pm] Cide: insets = { left = 11, right = 12, top = 12, bottom = 11 }};
+--]]
\ No newline at end of file
diff --git a/PerfectRaid_Range.lua b/PerfectRaid_Range.lua
index ccaec02..c718ea5 100644
--- a/PerfectRaid_Range.lua
+++ b/PerfectRaid_Range.lua
@@ -134,13 +134,13 @@ function Range:CreateOptions(opt)
table.insert(options.widgets, slider)
local cancel = CreateFrame("Button", "PRRange_Cancel", options, "PRButtonTemplate")
- cancel.Label:SetText(L["Cancel"])
+ cancel:SetText(L["Cancel"])
cancel:SetPoint("BOTTOMRIGHT", 0, 5)
cancel:SetScript("OnClick", function() self:OnShow() end)
cancel:Show()
local save = CreateFrame("Button", "PRRange_Save", options, "PRButtonTemplate")
- save.Label:SetText(L["Save"])
+ save:SetText(L["Save"])
save:SetPoint("BOTTOMRIGHT", cancel, "BOTTOMLEFT", -10, 0)
save:SetScript("OnClick", function() self:SaveOptions() end)
save:Show()