diff --git a/PerfectRaid.lua b/PerfectRaid.lua
index cb9bcec..c5051e4 100644
--- a/PerfectRaid.lua
+++ b/PerfectRaid.lua
@@ -33,6 +33,12 @@ local frames = {}
local unavail = {}
local aggro = {}
+assert(DongleStub, string.format("PerfectRaid requires DongleStub."))
+assert(DongleStub:GetVersion() == "DongleStub-Beta0",
+ string.format("PerfectRaid requires DongleStub-Beta0. You are using an older version."))
+assert(DongleStub("Dongle-Beta0"),
+ string.format("PerfectRaid requires Dongle-Beta0. You are using an older version."))
+
local L = PerfectRaidLocals
local utils = DongleStub("DongleUtils")
PerfectRaid = DongleStub("Dongle-Beta0"):New("PerfectRaid")
@@ -405,16 +411,21 @@ end
function PerfectRaid.ConfigureButton(button)
local self = PerfectRaid
- button:SetAttribute("initial-width", 200)
+ button:SetAttribute("initial-width", 225)
button:SetAttribute("initial-height", 14)
--- button:SetBackdrop(GameTooltip:GetBackdrop())
- button:SetBackdropColor(0.3, 0.3, 0.3)
- button:SetBackdropBorderColor(0.4, 0.4, 0.4)
-
ClickCastFrames[button] = true
button:SetAttribute("*type1", "target")
+ local bg = button:CreateTexture(nil, "BACKGROUND")
+ bg:SetAllPoints()
+ bg:SetTexture("Interface\\AddOns\\PerfectRaid\\images\\Highlight")
+ bg:Hide()
+ button.bg = bg
+
+ button:SetScript("OnEnter", function(frame) bg:Show() end)
+ button:SetScript("OnLeave", function(frame) bg:Hide() end)
+
local parent = button:GetParent()
button.dragparent = parent.dragparent
button.header = parent
@@ -427,12 +438,12 @@ function PerfectRaid.ConfigureButton(button)
local rightbox = CreateFrame("Frame", nil, button)
rightbox:SetPoint("TOPRIGHT", 0, 0)
- rightbox:SetPoint("BOTTOMLEFT", button, "BOTTOMRIGHT", -40, 0)
+ rightbox:SetPoint("BOTTOMLEFT", button, "BOTTOMRIGHT", -70, 0)
button.rightbox = rightbox
local bar = CreateFrame("StatusBar", nil, button)
- bar:SetPoint("TOPLEFT", leftbox, "TOPRIGHT", 0, 0)
- bar:SetPoint("BOTTOMRIGHT", rightbox, "BOTTOMLEFT", 0, 0)
+ bar:SetPoint("TOPLEFT", leftbox, "TOPRIGHT", 0, -2)
+ bar:SetPoint("BOTTOMRIGHT", rightbox, "BOTTOMLEFT", 0, 2)
bar:SetStatusBarTexture("Interface\\AddOns\\PerfectRaid\\images\\smooth")
button.healthbar = bar
@@ -483,7 +494,7 @@ function PerfectRaid.ConfigureButton(button)
looticon:Hide()
local font = button.healthbar:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
- font:SetPoint("RIGHT", -2, 2)
+ font:SetPoint("RIGHT", -2, 0)
button.status = font
button:SetClampedToScreen(true)