mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- minor cleanup of the GCD module to make it (hopefully) more reliable
- doubled the maximum width of the rangecheck frame to ideally knock out the occasional complaint that certain fonts make the text spill onto a second line (never seen that myself)
This commit is contained in:
@ -17,8 +17,6 @@ function GlobalCoolDown.prototype:Enable(core)
|
||||
|
||||
self:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN", "CooldownStateChanged")
|
||||
|
||||
local r, g, b = self.settings.backgroundColor.r, self.settings.backgroundColor.g, self.settings.backgroundColor.b
|
||||
self.frame.bg:SetVertexColor(r, g, b, 0.6)
|
||||
self:Show(false)
|
||||
|
||||
self.frame:SetFrameStrata("TOOLTIP")
|
||||
@ -73,11 +71,12 @@ end
|
||||
function GlobalCoolDown.prototype:CooldownStateChanged()
|
||||
local start, dur = GetSpellCooldown(self:GetSpellId())
|
||||
|
||||
if dur ~= nil and dur > 0 and dur <= 1.5 then
|
||||
if start and dur ~= nil and dur > 0 and dur <= 1.5 then
|
||||
local bRestart = not self.startTime or start > self.startTime + dur
|
||||
self.startTime = start
|
||||
self.duration = dur
|
||||
|
||||
if self.CurrScale < 0.01 or self.CurrScale == 1 then
|
||||
if bRestart then
|
||||
self:SetScale(1, true)
|
||||
self.LastScale = 1
|
||||
self.DesiredScale = 0
|
||||
@ -103,5 +102,13 @@ function GlobalCoolDown.prototype:MyOnUpdate()
|
||||
end
|
||||
end
|
||||
|
||||
function GlobalCoolDown.prototype:CreateFrame()
|
||||
GlobalCoolDown.super.prototype.CreateFrame(self)
|
||||
|
||||
self.barFrame.bar:SetVertexColor(self:GetColor("GlobalCoolDown", 0.8))
|
||||
local r, g, b = self.settings.backgroundColor.r, self.settings.backgroundColor.g, self.settings.backgroundColor.b
|
||||
self.frame.bg:SetVertexColor(r, g, b, 0.6)
|
||||
end
|
||||
|
||||
-- Load us up
|
||||
IceHUD.GlobalCoolDown = GlobalCoolDown:new()
|
||||
|
@ -126,7 +126,7 @@ function RangeCheck.prototype:CreateFrame(redraw)
|
||||
|
||||
self.frame:SetScale(self.moduleSettings.scale)
|
||||
self.frame:SetFrameStrata("BACKGROUND")
|
||||
self.frame:SetWidth(100)
|
||||
self.frame:SetWidth(200)
|
||||
self.frame:SetHeight(32)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:SetPoint("TOP", self.parent, "TOP", self.moduleSettings.hpos, self.moduleSettings.vpos)
|
||||
|
Reference in New Issue
Block a user