mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
9.0 compatibility updates - initial attempt
This commit is contained in:
@ -1040,7 +1040,7 @@ end
|
|||||||
|
|
||||||
-- Creates the actual bar
|
-- Creates the actual bar
|
||||||
function IceBarElement.prototype:CreateBar()
|
function IceBarElement.prototype:CreateBar()
|
||||||
self.barFrame = self:BarFactory(self.barFrame, "LOW", "ARTWORK")
|
self.barFrame = self:BarFactory(self.barFrame, "LOW", "ARTWORK", "Bar")
|
||||||
self:SetBarCoord(self.barFrame)
|
self:SetBarCoord(self.barFrame)
|
||||||
|
|
||||||
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
|
self.barFrame.bar:SetBlendMode(self.settings.barBlendMode)
|
||||||
@ -1050,9 +1050,9 @@ end
|
|||||||
|
|
||||||
-- Returns a barFrame & barFrame.bar
|
-- Returns a barFrame & barFrame.bar
|
||||||
-- Rokiyo: Currently keeping old behaviour of running through bar creation on every Redraw, but I'm not convinced we need to.
|
-- Rokiyo: Currently keeping old behaviour of running through bar creation on every Redraw, but I'm not convinced we need to.
|
||||||
function IceBarElement.prototype:BarFactory(barFrame, frameStrata, textureLayer)
|
function IceBarElement.prototype:BarFactory(barFrame, frameStrata, textureLayer, nameSuffix)
|
||||||
if not (barFrame) then
|
if not (barFrame) then
|
||||||
barFrame = CreateFrame("Frame", nil, self.frame)
|
barFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_"..(nameSuffix or "Bar"), self.frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
barFrame:SetFrameStrata(frameStrata and frameStrata or "LOW")
|
barFrame:SetFrameStrata(frameStrata and frameStrata or "LOW")
|
||||||
@ -1584,7 +1584,7 @@ function IceBarElement.prototype:CreateMarker(idx)
|
|||||||
self.Markers[idx] = nil
|
self.Markers[idx] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
self.Markers[idx] = self:BarFactory(self.Markers[idx], "MEDIUM", "OVERLAY")
|
self.Markers[idx] = self:BarFactory(self.Markers[idx], "MEDIUM", "OVERLAY", "Marker"..idx)
|
||||||
|
|
||||||
local color = self.moduleSettings.markers[idx].color
|
local color = self.moduleSettings.markers[idx].color
|
||||||
self.Markers[idx].bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
self.Markers[idx].bar:SetVertexColor(color.r, color.g, color.b, self.alpha)
|
||||||
|
@ -69,7 +69,7 @@ function IceElement.prototype:Create(parent)
|
|||||||
|
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
if not self.masterFrame then
|
if not self.masterFrame then
|
||||||
self.masterFrame = CreateFrame("Frame", nil, self.parent)
|
self.masterFrame = CreateFrame("Frame", "IceHUD_Element_"..self.elementName, self.parent)
|
||||||
self.masterFrame:SetFrameStrata("MEDIUM")
|
self.masterFrame:SetFrameStrata("MEDIUM")
|
||||||
end
|
end
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
|
13
IceHUD.lua
13
IceHUD.lua
@ -259,6 +259,10 @@ function IceHUD:NotifyOptionsChange()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceHUD:OnEnable(isFirst)
|
function IceHUD:OnEnable(isFirst)
|
||||||
|
-- if isFirst then
|
||||||
|
self:SetDebugging(self.IceCore:GetDebug())
|
||||||
|
self.debugFrame = ChatFrame1
|
||||||
|
-- end
|
||||||
self:Debug("IceHUD:OnEnable()")
|
self:Debug("IceHUD:OnEnable()")
|
||||||
|
|
||||||
if self.db.profile.enable then
|
if self.db.profile.enable then
|
||||||
@ -274,11 +278,6 @@ function IceHUD:OnEnable(isFirst)
|
|||||||
--@debug@
|
--@debug@
|
||||||
IceHUD_Options:OnLoad()
|
IceHUD_Options:OnLoad()
|
||||||
--@end-debug@
|
--@end-debug@
|
||||||
|
|
||||||
-- if isFirst then
|
|
||||||
self:SetDebugging(self.IceCore:GetDebug())
|
|
||||||
self.debugFrame = ChatFrame1
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- add settings changes/updates here so that existing users don't lose their settings
|
-- add settings changes/updates here so that existing users don't lose their settings
|
||||||
@ -367,7 +366,11 @@ function IceHUD:Debug(...)
|
|||||||
for n=1,select('#', ...) do
|
for n=1,select('#', ...) do
|
||||||
msg = msg .. tostring(select(n, ...)) .. " "
|
msg = msg .. tostring(select(n, ...)) .. " "
|
||||||
end
|
end
|
||||||
|
if self.debugFrame then
|
||||||
self.debugFrame:AddMessage(msg)
|
self.debugFrame:AddMessage(msg)
|
||||||
|
else
|
||||||
|
print(msg)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## Interface: 80300
|
## Interface: 90001
|
||||||
## Author: Parnic, originally created by Iceroth
|
## Author: Parnic, originally created by Iceroth
|
||||||
## Name: IceHUD
|
## Name: IceHUD
|
||||||
## Title: IceHUD |cff7fff7f-Ace3-|r
|
## Title: IceHUD |cff7fff7f-Ace3-|r
|
||||||
@ -9,7 +9,7 @@
|
|||||||
## X-Category: HUDs
|
## X-Category: HUDs
|
||||||
## X-Website: https://www.wowace.com/projects/ice-hud
|
## X-Website: https://www.wowace.com/projects/ice-hud
|
||||||
## X-WoWI-ID: 8149
|
## X-WoWI-ID: 8149
|
||||||
## X-Compatible-With: 11302
|
## X-Compatible-With: 11305
|
||||||
|
|
||||||
#@no-lib-strip@
|
#@no-lib-strip@
|
||||||
# Libraries
|
# Libraries
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
## Interface: 80300
|
## Interface: 90001
|
||||||
## Title: IceHUD |cff7fff7f-Options-|r
|
## Title: IceHUD |cff7fff7f-Options-|r
|
||||||
## Author: Parnic
|
## Author: Parnic
|
||||||
## Version: @project-version@
|
## Version: @project-version@
|
||||||
|
@ -171,7 +171,7 @@ end
|
|||||||
-- Creates the low amount warning frame
|
-- Creates the low amount warning frame
|
||||||
function IceUnitBar.prototype:CreateFlashFrame()
|
function IceUnitBar.prototype:CreateFlashFrame()
|
||||||
if not (self.flashFrame) then
|
if not (self.flashFrame) then
|
||||||
self.flashFrame = CreateFrame("Frame", nil, self.frame)
|
self.flashFrame = CreateFrame("Frame", "IceHUD_"..self.elementName.."_Flash", self.frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.flashFrame:SetFrameStrata("BACKGROUND")
|
self.flashFrame:SetFrameStrata("BACKGROUND")
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
v1.13.0:
|
||||||
|
- Made compatible with 9.0
|
||||||
|
- Improved frame naming/debuggability
|
||||||
|
- Updated TOC for 9.0
|
||||||
|
|
||||||
v1.12.15:
|
v1.12.15:
|
||||||
- (Classic) Fixed reported issue with the Threat bar throwing errors sometimes.
|
- (Classic) Fixed reported issue with the Threat bar throwing errors sometimes.
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ end
|
|||||||
|
|
||||||
function CastBar.prototype:CreateLagBar()
|
function CastBar.prototype:CreateLagBar()
|
||||||
if self.lagBar == nil then
|
if self.lagBar == nil then
|
||||||
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY")
|
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
|
||||||
end
|
end
|
||||||
|
|
||||||
local r, g, b = self:GetColor("CastLag")
|
local r, g, b = self:GetColor("CastLag")
|
||||||
|
@ -107,7 +107,7 @@ function EclipseBar.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function EclipseBar.prototype:CreateSolarBar()
|
function EclipseBar.prototype:CreateSolarBar()
|
||||||
self.solarBar = self:BarFactory(self.solarBar,"BACKGROUND", "ARTWORK")
|
self.solarBar = self:BarFactory(self.solarBar,"BACKGROUND", "ARTWORK", "Solar")
|
||||||
self:SetBarCoord(self.solarBar, 0.5, true)
|
self:SetBarCoord(self.solarBar, 0.5, true)
|
||||||
|
|
||||||
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))
|
self.solarBar.bar:SetVertexColor(self:GetColor("EclipseSolar", 1))
|
||||||
|
@ -255,7 +255,7 @@ function GlobalCoolDown.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function GlobalCoolDown.prototype:CreateLagBar()
|
function GlobalCoolDown.prototype:CreateLagBar()
|
||||||
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY")
|
self.lagBar = self:BarFactory(self.lagBar, "LOW", "OVERLAY", "Lag")
|
||||||
|
|
||||||
local r, g, b = self:GetColor("CastLag")
|
local r, g, b = self:GetColor("CastLag")
|
||||||
if (self.settings.backgroundToggle) then
|
if (self.settings.backgroundToggle) then
|
||||||
|
@ -49,7 +49,9 @@ function PetHealth.prototype:Enable(core)
|
|||||||
self:RegisterEvent("UNIT_PET", "CheckPet");
|
self:RegisterEvent("UNIT_PET", "CheckPet");
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||||
|
if IceHUD.WowVer < 90000 then
|
||||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||||
|
end
|
||||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||||
|
|
||||||
if UnitHasVehicleUI then
|
if UnitHasVehicleUI then
|
||||||
|
@ -68,7 +68,9 @@ function PlayerHealth.prototype:Enable(core)
|
|||||||
PlayerHealth.super.prototype.Enable(self, core)
|
PlayerHealth.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH", "UpdateEvent")
|
||||||
|
if IceHUD.WowVer < 90000 then
|
||||||
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
self:RegisterEvent("UNIT_HEALTH_FREQUENT", "UpdateEvent")
|
||||||
|
end
|
||||||
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
self:RegisterEvent("UNIT_MAXHEALTH", "UpdateEvent")
|
||||||
|
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", "EnteringWorld")
|
||||||
@ -934,7 +936,7 @@ function PlayerHealth.prototype:CreateBackground(redraw)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:CreateHealBar()
|
function PlayerHealth.prototype:CreateHealBar()
|
||||||
self.healFrame = self:BarFactory(self.healFrame, "LOW","BACKGROUND")
|
self.healFrame = self:BarFactory(self.healFrame, "LOW","BACKGROUND", "Heal")
|
||||||
|
|
||||||
self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
self.healFrame.bar:SetVertexColor(self:GetColor("PlayerHealthHealAmount", self.alpha * self.moduleSettings.healAlpha))
|
||||||
|
|
||||||
@ -946,7 +948,7 @@ function PlayerHealth.prototype:CreateHealBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function PlayerHealth.prototype:CreateAbsorbBar()
|
function PlayerHealth.prototype:CreateAbsorbBar()
|
||||||
self.absorbFrame = self:BarFactory(self.absorbFrame, "LOW","BACKGROUND")
|
self.absorbFrame = self:BarFactory(self.absorbFrame, "LOW","BACKGROUND", "Absorb")
|
||||||
|
|
||||||
self.absorbFrame.bar:SetVertexColor(self:GetColor("PlayerHealthAbsorbAmount", self.alpha * self.moduleSettings.absorbAlpha))
|
self.absorbFrame.bar:SetVertexColor(self:GetColor("PlayerHealthAbsorbAmount", self.alpha * self.moduleSettings.absorbAlpha))
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ function RollTheBones.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function RollTheBones.prototype:CreateDurationBar()
|
function RollTheBones.prototype:CreateDurationBar()
|
||||||
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK")
|
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration")
|
||||||
|
|
||||||
-- Rokiyo: Do we need to call this here?
|
-- Rokiyo: Do we need to call this here?
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
|
@ -182,7 +182,7 @@ function SliceAndDice.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:CreateDurationBar()
|
function SliceAndDice.prototype:CreateDurationBar()
|
||||||
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK")
|
self.durationFrame = self:BarFactory(self.durationFrame, "BACKGROUND","ARTWORK", "Duration")
|
||||||
|
|
||||||
-- Rokiyo: Do we need to call this here?
|
-- Rokiyo: Do we need to call this here?
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
|
@ -137,7 +137,7 @@ function StaggerBar.prototype:CreateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function StaggerBar.prototype:CreateTimerBar()
|
function StaggerBar.prototype:CreateTimerBar()
|
||||||
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK")
|
self.timerFrame = self:BarFactory(self.timerFrame, "MEDIUM","ARTWORK", "Timer")
|
||||||
|
|
||||||
self.CurrScale = 0
|
self.CurrScale = 0
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ end
|
|||||||
|
|
||||||
-- create the aggro range indicator bar
|
-- create the aggro range indicator bar
|
||||||
function IceThreat.prototype:CreateAggroBar()
|
function IceThreat.prototype:CreateAggroBar()
|
||||||
self.aggroBar = self:BarFactory(self.aggroBar, "BACKGROUND","ARTWORK")
|
self.aggroBar = self:BarFactory(self.aggroBar, "BACKGROUND","ARTWORK", "Aggro")
|
||||||
|
|
||||||
local r, g, b = self:GetColor("ThreatPullAggro")
|
local r, g, b = self:GetColor("ThreatPullAggro")
|
||||||
if (self.settings.backgroundToggle) then
|
if (self.settings.backgroundToggle) then
|
||||||
@ -243,7 +243,7 @@ function IceThreat.prototype:CreateAggroBar()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceThreat.prototype:CreateSecondThreatBar()
|
function IceThreat.prototype:CreateSecondThreatBar()
|
||||||
self.secondThreatBar = self:BarFactory(self.secondThreatBar, "MEDIUM", "OVERLAY")
|
self.secondThreatBar = self:BarFactory(self.secondThreatBar, "MEDIUM", "OVERLAY", "SecondThreat")
|
||||||
|
|
||||||
self.secondThreatBar.bar:SetVertexColor(self:GetColor("ThreatSecondPlace", self.alpha * self.moduleSettings.secondPlaceThreatAlpha))
|
self.secondThreatBar.bar:SetVertexColor(self:GetColor("ThreatSecondPlace", self.alpha * self.moduleSettings.secondPlaceThreatAlpha))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user