diff --git a/Images/Countdown/0.blp b/Images/Countdown/0.blp index d8ad777..3c4a50c 100644 Binary files a/Images/Countdown/0.blp and b/Images/Countdown/0.blp differ diff --git a/Images/Countdown/1.blp b/Images/Countdown/1.blp index 849c799..469aa51 100644 Binary files a/Images/Countdown/1.blp and b/Images/Countdown/1.blp differ diff --git a/Images/Countdown/2.blp b/Images/Countdown/2.blp index b74cce1..10aba5e 100644 Binary files a/Images/Countdown/2.blp and b/Images/Countdown/2.blp differ diff --git a/Images/Countdown/3.blp b/Images/Countdown/3.blp index c4157cb..3627fa6 100644 Binary files a/Images/Countdown/3.blp and b/Images/Countdown/3.blp differ diff --git a/Images/Countdown/4.blp b/Images/Countdown/4.blp index 6480f0d..dd3c6cc 100644 Binary files a/Images/Countdown/4.blp and b/Images/Countdown/4.blp differ diff --git a/Images/Countdown/5.blp b/Images/Countdown/5.blp index 4cfac61..e7a6e0e 100644 Binary files a/Images/Countdown/5.blp and b/Images/Countdown/5.blp differ diff --git a/Images/Countdown/6.blp b/Images/Countdown/6.blp index 4d34be0..a19c292 100644 Binary files a/Images/Countdown/6.blp and b/Images/Countdown/6.blp differ diff --git a/Images/Countdown/7.blp b/Images/Countdown/7.blp index 4293f83..d6979f2 100644 Binary files a/Images/Countdown/7.blp and b/Images/Countdown/7.blp differ diff --git a/Images/Countdown/8.blp b/Images/Countdown/8.blp index fb4c555..8d4eebc 100644 Binary files a/Images/Countdown/8.blp and b/Images/Countdown/8.blp differ diff --git a/Images/Countdown/9.blp b/Images/Countdown/9.blp index 7a4bbb9..290049b 100644 Binary files a/Images/Countdown/9.blp and b/Images/Countdown/9.blp differ diff --git a/Images/Countdown/Alliance.blp b/Images/Countdown/Alliance.blp new file mode 100644 index 0000000..e6218ff Binary files /dev/null and b/Images/Countdown/Alliance.blp differ diff --git a/Images/Countdown/Horde.blp b/Images/Countdown/Horde.blp new file mode 100644 index 0000000..2c489da Binary files /dev/null and b/Images/Countdown/Horde.blp differ diff --git a/Modules/ArenaCountDown.lua b/Modules/ArenaCountDown.lua index ca404d1..274721c 100644 --- a/Modules/ArenaCountDown.lua +++ b/Modules/ArenaCountDown.lua @@ -21,33 +21,34 @@ function ACDFrame:Initialize() local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent) ACDNumFrame:EnableMouse(false) - ACDNumFrame:SetHeight(256) - ACDNumFrame:SetWidth(256) - ACDNumFrame:SetPoint("CENTER", 0, 128) + ACDNumFrame:SetHeight(512) + ACDNumFrame:SetWidth(512) + ACDNumFrame:SetPoint("CENTER", 0, 256) ACDNumFrame:Show() self.ACDNumFrame = ACDNumFrame local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH") ACDNumTens:SetWidth(256) - ACDNumTens:SetHeight(128) + ACDNumTens:SetHeight(256) ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -48, 0) self.ACDNumTens = ACDNumTens local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH") ACDNumOnes:SetWidth(256) - ACDNumOnes:SetHeight(128) + ACDNumOnes:SetHeight(256) ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 48, 0) self.ACDNumOnes = ACDNumOnes local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH") ACDNumOne:SetWidth(256) - ACDNumOne:SetHeight(128) + ACDNumOne:SetHeight(256) ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0) self.ACDNumOne = ACDNumOne self:RegisterMessage("JOINED_ARENA") self:RegisterMessage("ENEMY_SPOTTED") self:RegisterMessage("UNIT_SPEC") + self.faction = UnitFactionGroup("player") end function ACDFrame.OnUpdate(self, elapse) @@ -57,11 +58,7 @@ function ACDFrame.OnUpdate(self, elapse) if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then local str = tostring(floor(self.countdown - elapse)); - if (floor(self.countdown - elapse) == 0) then - self.ACDNumTens:Hide(); - self.ACDNumOnes:Hide(); - self.ACDNumOne:Hide(); - elseif (str_len(str) == 2) then + if (str_len(str) == 2) then -- Display has 2 digits self.ACDNumOne:Hide(); self.ACDNumTens:Show(); @@ -72,8 +69,10 @@ function ACDFrame.OnUpdate(self, elapse) self.ACDNumFrame:SetScale(0.7) elseif (str_len(str) == 1) then -- Display has 1 digit + local numStr = str_sub(str, 0, 1) + local path = numStr == "0" and self.faction or numStr self.ACDNumOne:Show(); - self.ACDNumOne:SetTexture(self.texturePath .. str_sub(str, 0, 1)); + self.ACDNumOne:SetTexture(self.texturePath .. path); self.ACDNumOnes:Hide(); self.ACDNumTens:Hide(); self.ACDNumFrame:SetScale(1.0) @@ -92,18 +91,24 @@ function ACDFrame.OnUpdate(self, elapse) end function ACDFrame:JOINED_ARENA() - self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") - self:SetScript("OnEvent", ACDFrame.OnEvent) - self.endTime = GetTime() + 70 - self:SetScript("OnUpdate", ACDFrame.OnUpdate) + if Gladdy.db.countdown then + self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL") + self:SetScript("OnEvent", ACDFrame.OnEvent) + self.endTime = GetTime() + 70 + self:SetScript("OnUpdate", ACDFrame.OnUpdate) + end end function ACDFrame:ENEMY_SPOTTED() - ACDFrame:Reset() + if not Gladdy.frame.testing then + ACDFrame:Reset() + end end function ACDFrame:UNIT_SPEC() - ACDFrame:Reset() + if not Gladdy.frame.testing then + ACDFrame:Reset() + end end function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg) @@ -124,15 +129,15 @@ function ACDFrame:UpdateFrame() self.ACDNumFrame:SetPoint("CENTER", 0, 128) self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize/2) + self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize) self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize/2) + self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize) self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0) self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize) - self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize/2) + self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize) self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0) end