Quantcast

* initial rework for the magical 32x32 theme

James Whitehead II [12-30-06 - 07:02]
* initial rework for the magical 32x32 theme
Filename
PerfectRaid.lua
PerfectRaid.xml
images/OrangeTheme/Bg.tga
images/OrangeTheme/Bot.tga
images/OrangeTheme/BotLeft.tga
images/OrangeTheme/BotRight.tga
images/OrangeTheme/ButtonHighlightLeft.tga
images/OrangeTheme/ButtonHighlightMiddle.tga
images/OrangeTheme/ButtonHighlightRight.tga
images/OrangeTheme/ButtonNormalLeft.tga
images/OrangeTheme/ButtonNormalMiddle.tga
images/OrangeTheme/ButtonNormalRight.tga
images/OrangeTheme/CheckButton.tga
images/OrangeTheme/CheckButtonChecked.tga
images/OrangeTheme/Left.tga
images/OrangeTheme/Right.tga
images/OrangeTheme/TabLeft.tga
images/OrangeTheme/TabLeftInactive.tga
images/OrangeTheme/TabMiddle.tga
images/OrangeTheme/TabMiddleInactive.tga
images/OrangeTheme/TabRight.tga
images/OrangeTheme/TabRightInactive.tga
images/OrangeTheme/Top.tga
images/OrangeTheme/TopLeft.tga
images/OrangeTheme/TopRight.tga
diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index c3f5507..3351339 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -474,7 +474,7 @@ end

 function PerfectRaid:CreateFrame(name, parent)
 	local frame = CreateFrame("Frame", name, parent)
-	frame:SetBackdrop(GameTooltip:GetBackdrop())
+	frame:SetBackdrop(StaticPopup1:GetBackdrop())
 	frame:SetBackdropColor(0,0,0)
 	return frame
 end
@@ -499,7 +499,7 @@ function PerfectRaid:AddMenuItem(name, order, frame)
 	local num = #menuItems + 1
 	local button = CreateFrame("CheckButton", "PRMenuItem"..num, PROptionsMenu)
 	button:SetHeight(20)
-	button:SetWidth(140)
+	button:SetWidth(120)
 	button:SetHighlightTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
 	button:SetCheckedTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
 	button:SetScript("OnClick", OnClick)
@@ -532,7 +532,7 @@ function PerfectRaid:AddMenuItem(name, order, frame)
 		button.frame = entry.frame
 	end

-	PRMenuItem1:SetPoint("TOP", 0, -7)
+	PRMenuItem1:SetPoint("TOP", 0, -15)
 	for i=2,#menuItems do
 		local button = buttons[i]
 		button:SetPoint("TOP", buttons[i-1], "BOTTOM", 0, -2)
@@ -649,4 +649,33 @@ function PerfectRaid:CreateFrameEditor()
 	texture:SetVertexColor(0,0,0,0.3)
 end

-PerfectRaid:CreateOptions()
+--PerfectRaid:CreateOptions()
+
+--[[
+foo = CreateFrame("Frame", "PRTestOptions", UIParent, "PROptionsTemplate")
+foo:SetHeight(300) foo:SetWidth(450)
+foo:SetPoint("CENTER", 0, 0)
+foo:Show()
+
+local tab1 = CreateFrame("Button", "PRTab1", foo, "PRTabTemplate")
+tab1:SetPoint("TOPLEFT", foo, "BOTTOMLEFT", 10, 12)
+tab1:Show()
+
+local tab2 = CreateFrame("Button", "PRTab2", foo, "PRTabTemplate")
+tab2:SetPoint("TOPLEFT", tab1, "TOPRIGHT", 3, 0)
+tab2:Show()
+
+local tab3 = CreateFrame("Button", "PRTab3", foo, "PRTabTemplate")
+tab3:SetPoint("TOPLEFT", tab2, "TOPRIGHT", 3, 0)
+tab3:SetWidth(150)
+tab3:Show()
+
+local check1 = CreateFrame("CheckButton", "PRCheck1", foo, "PRCheckTemplate")
+check1:SetHeight(16) check1:SetWidth(16)
+check1:SetPoint("TOPLEFT", 20, -30)
+check1:Show()
+
+local button1 = CreateFrame("Button", "PRButton1", foo, "PRButtonTemplate")
+button1:SetPoint("BOTTOMRIGHT", foo, -15, 17)
+button1:Show()
+--]]
\ No newline at end of file
diff --git a/PerfectRaid.xml b/PerfectRaid.xml
index 46d2d3a..e770db0 100644
--- a/PerfectRaid.xml
+++ b/PerfectRaid.xml
@@ -1,43 +1,207 @@
 <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">
-      <CheckButton name="PRaidIconTemplate" virtual="true">
-                <Size>
-                        <AbsDimension x="36" y="36"/>
-                </Size>
-                <Layers>
-                        <Layer level="BACKGROUND">
-                                <Texture file="Interface\Buttons\UI-EmptySlot-Disabled">
-                                        <Size>
-                                                <AbsDimension x="64" y="64"/>
-                                        </Size>
-                                        <Anchors>
-                                                <Anchor point="CENTER">
-                                                        <Offset>
-                                                                <AbsDimension x="0" y="-1"/>
-                                                        </Offset>
-                                                </Anchor>
-                                        </Anchors>
-                                </Texture>
-                        </Layer>
-                </Layers>
-                <NormalTexture name="$parentIcon">
-                        <Size>
-                                <AbsDimension x="36" y="36"/>
-                        </Size>
-                        <Anchors>
-                                <Anchor point="CENTER">
-                                        <Offset>
-                                                <AbsDimension x="0" y="-1"/>
-                                        </Offset>
-                                </Anchor>
-                        </Anchors>
-                </NormalTexture>
-                <HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
-                <CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
-        <Scripts>
-            <OnClick>
-                PerfectRaid:SelectBuffIcon()
-            </OnClick>
-        </Scripts>
-        </CheckButton>
+	<Frame name="PROptionsTemplate" hidden="true" virtual="true" moveable="true" enableMouse="true">
+		<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"/>
+					</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">
+					<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="Sample Options Frame">
+					<Anchors>
+						<Anchor point="CENTER" relativeTo="$parentTop" relativePoint="CENTER">
+							<Offset><AbsDimension x="0" y="7"/></Offset>
+						</Anchor>
+					</Anchors>
+				</FontString>
+			</Layer>
+		</Layers>
+		<Scripts>
+			<OnLoad>
+				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)
+			</OnLoad>
+		</Scripts>
+	</Frame>
+	<Button name="PRTabTemplate" hidden="true" virtual="true">
+		<Size>
+			<AbsDimension x="96" 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")
+			</OnLoad>
+			<OnClick>
+				local parent = self:GetParent()
+				local old = parent.TabSelected
+				if old then
+					old.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabLeftInactive")
+					old.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabMiddleInactive")
+					old.Right:SetTexture("Interface\\AddOns\\Perfectraid\\images\\OrangeTheme\\TabRightInactive")
+				end
+				self.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabLeft")
+				self.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\TabMiddle")
+				self.Right:SetTexture("Interface\\AddOns\\Perfectraid\\images\\OrangeTheme\\TabRight")
+
+				parent.TabSelected = self
+				--parent:OnTabSelected()
+			</OnClick>
+		</Scripts>
+	</Button>
+	<CheckButton name="PRCheckTemplate" hidden="true" virtual="true">
+		<Size><AbsDimension x="32" y="32"/></Size>
+		<NormalTexture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\CheckButton"/>
+		<CheckedTexture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\CheckButtonChecked"/>
+		<HighlightTexture file="Interface\AddOns\PerfectRaid\images\OrangeTheme\CheckButtonChecked"/>
+		<Layers>
+			<Layer level="ARTWORK">
+				<FontString name="$parentTitle" inherits="GameFontHighlightSmall" text="Check Label">
+					<Anchors>
+						<Anchor point="LEFT" relativePoint="RIGHT">
+							<Offset><AbsDimension x="5" y="0"/></Offset>
+						</Anchor>
+					</Anchors>
+				</FontString>
+			</Layer>
+		</Layers>
+	</CheckButton>
+	<Button name="PRButtonTemplate" hidden="true" virtual="true">
+		<Size><AbsDimension x="96" y="32"/></Size>
+		<Layers>
+			<Layer level="BACKGROUND">
+				<Texture name="$parentLeft" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\ButtonNormalLeft">
+					<Size><AbsDimension x="32" y="32"/></Size>
+					<Anchors>
+						<Anchor point="BOTTOMLEFT"/>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentRight" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\ButtonNormalRight">
+					<Size><AbsDimension x="32" y="32"/></Size>
+					<Anchors>
+						<Anchor point="BOTTOMRIGHT"/>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentMiddle" file="Interface\AddOns\PerfectRaid\images\OrangeTheme\ButtonNormalMiddle">
+					<Anchors>
+						<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
+						<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
+					</Anchors>
+				</Texture>
+			</Layer>
+			<Layer level="ARTWORK">
+				<FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="Button Label">
+					<Anchors>
+						<Anchor point="CENTER"/>
+					</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.Label = getglobal(name.."Label")
+			</OnLoad>
+			<OnEnter>
+				self.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonHighlightLeft")
+				self.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonHighlightMiddle")
+				self.Right:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonHighlightRight")
+			</OnEnter>
+			<OnLeave>
+				self.Left:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonNormalLeft")
+				self.Middle:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonNormalMiddle")
+				self.Right:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\OrangeTheme\\ButtonNormalRight")
+			</OnLeave>
+		</Scripts>
+	</Button>
 </Ui>
\ No newline at end of file
diff --git a/images/OrangeTheme/Bg.tga b/images/OrangeTheme/Bg.tga
new file mode 100644
index 0000000..f0a97da
Binary files /dev/null and b/images/OrangeTheme/Bg.tga differ
diff --git a/images/OrangeTheme/Bot.tga b/images/OrangeTheme/Bot.tga
new file mode 100755
index 0000000..bc88691
Binary files /dev/null and b/images/OrangeTheme/Bot.tga differ
diff --git a/images/OrangeTheme/BotLeft.tga b/images/OrangeTheme/BotLeft.tga
new file mode 100755
index 0000000..4068638
Binary files /dev/null and b/images/OrangeTheme/BotLeft.tga differ
diff --git a/images/OrangeTheme/BotRight.tga b/images/OrangeTheme/BotRight.tga
new file mode 100755
index 0000000..749ca23
Binary files /dev/null and b/images/OrangeTheme/BotRight.tga differ
diff --git a/images/OrangeTheme/ButtonHighlightLeft.tga b/images/OrangeTheme/ButtonHighlightLeft.tga
new file mode 100755
index 0000000..2d48e3d
Binary files /dev/null and b/images/OrangeTheme/ButtonHighlightLeft.tga differ
diff --git a/images/OrangeTheme/ButtonHighlightMiddle.tga b/images/OrangeTheme/ButtonHighlightMiddle.tga
new file mode 100755
index 0000000..68ae1c8
Binary files /dev/null and b/images/OrangeTheme/ButtonHighlightMiddle.tga differ
diff --git a/images/OrangeTheme/ButtonHighlightRight.tga b/images/OrangeTheme/ButtonHighlightRight.tga
new file mode 100755
index 0000000..ff42927
Binary files /dev/null and b/images/OrangeTheme/ButtonHighlightRight.tga differ
diff --git a/images/OrangeTheme/ButtonNormalLeft.tga b/images/OrangeTheme/ButtonNormalLeft.tga
new file mode 100755
index 0000000..ffe430a
Binary files /dev/null and b/images/OrangeTheme/ButtonNormalLeft.tga differ
diff --git a/images/OrangeTheme/ButtonNormalMiddle.tga b/images/OrangeTheme/ButtonNormalMiddle.tga
new file mode 100755
index 0000000..2980b68
Binary files /dev/null and b/images/OrangeTheme/ButtonNormalMiddle.tga differ
diff --git a/images/OrangeTheme/ButtonNormalRight.tga b/images/OrangeTheme/ButtonNormalRight.tga
new file mode 100755
index 0000000..8460646
Binary files /dev/null and b/images/OrangeTheme/ButtonNormalRight.tga differ
diff --git a/images/OrangeTheme/CheckButton.tga b/images/OrangeTheme/CheckButton.tga
new file mode 100755
index 0000000..0742447
Binary files /dev/null and b/images/OrangeTheme/CheckButton.tga differ
diff --git a/images/OrangeTheme/CheckButtonChecked.tga b/images/OrangeTheme/CheckButtonChecked.tga
new file mode 100755
index 0000000..ed3110a
Binary files /dev/null and b/images/OrangeTheme/CheckButtonChecked.tga differ
diff --git a/images/OrangeTheme/Left.tga b/images/OrangeTheme/Left.tga
new file mode 100755
index 0000000..03f0452
Binary files /dev/null and b/images/OrangeTheme/Left.tga differ
diff --git a/images/OrangeTheme/Right.tga b/images/OrangeTheme/Right.tga
new file mode 100755
index 0000000..aec4c6d
Binary files /dev/null and b/images/OrangeTheme/Right.tga differ
diff --git a/images/OrangeTheme/TabLeft.tga b/images/OrangeTheme/TabLeft.tga
new file mode 100755
index 0000000..c1018b1
Binary files /dev/null and b/images/OrangeTheme/TabLeft.tga differ
diff --git a/images/OrangeTheme/TabLeftInactive.tga b/images/OrangeTheme/TabLeftInactive.tga
new file mode 100755
index 0000000..fa313d1
Binary files /dev/null and b/images/OrangeTheme/TabLeftInactive.tga differ
diff --git a/images/OrangeTheme/TabMiddle.tga b/images/OrangeTheme/TabMiddle.tga
new file mode 100755
index 0000000..99a95ba
Binary files /dev/null and b/images/OrangeTheme/TabMiddle.tga differ
diff --git a/images/OrangeTheme/TabMiddleInactive.tga b/images/OrangeTheme/TabMiddleInactive.tga
new file mode 100755
index 0000000..d4eb14b
Binary files /dev/null and b/images/OrangeTheme/TabMiddleInactive.tga differ
diff --git a/images/OrangeTheme/TabRight.tga b/images/OrangeTheme/TabRight.tga
new file mode 100755
index 0000000..6a9d720
Binary files /dev/null and b/images/OrangeTheme/TabRight.tga differ
diff --git a/images/OrangeTheme/TabRightInactive.tga b/images/OrangeTheme/TabRightInactive.tga
new file mode 100755
index 0000000..601f927
Binary files /dev/null and b/images/OrangeTheme/TabRightInactive.tga differ
diff --git a/images/OrangeTheme/Top.tga b/images/OrangeTheme/Top.tga
new file mode 100755
index 0000000..33c134a
Binary files /dev/null and b/images/OrangeTheme/Top.tga differ
diff --git a/images/OrangeTheme/TopLeft.tga b/images/OrangeTheme/TopLeft.tga
new file mode 100755
index 0000000..bc5e22a
Binary files /dev/null and b/images/OrangeTheme/TopLeft.tga differ
diff --git a/images/OrangeTheme/TopRight.tga b/images/OrangeTheme/TopRight.tga
new file mode 100755
index 0000000..a984318
Binary files /dev/null and b/images/OrangeTheme/TopRight.tga differ