mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- added support for the PlayerInfo module to hide the default buff frame
This commit is contained in:
@ -11,10 +11,38 @@ function PlayerInfo.prototype:GetDefaultSettings()
|
||||
|
||||
settings["enabled"] = false
|
||||
settings["vpos"] = -100
|
||||
settings["hideBlizz"] = false
|
||||
|
||||
return settings
|
||||
end
|
||||
|
||||
function PlayerInfo.prototype:GetOptions()
|
||||
local opts = PlayerInfo.super.prototype.GetOptions(self)
|
||||
|
||||
opts["hideBlizz"] = {
|
||||
type = "toggle",
|
||||
name = "Hide Blizzard Buff Frame",
|
||||
desc = "Hides Blizzard buffs frame and disables all events related to it",
|
||||
get = function()
|
||||
return self.moduleSettings.hideBlizz
|
||||
end,
|
||||
set = function(value)
|
||||
self.moduleSettings.hideBlizz = value
|
||||
if (value) then
|
||||
self:HideBlizz()
|
||||
else
|
||||
self:ShowBlizz()
|
||||
end
|
||||
end,
|
||||
disabled = function()
|
||||
return not self.moduleSettings.enabled
|
||||
end,
|
||||
order = 41
|
||||
}
|
||||
|
||||
return opts
|
||||
end
|
||||
|
||||
function PlayerInfo.prototype:CreateFrame(redraw)
|
||||
PlayerInfo.super.prototype.CreateFrame(self, redraw)
|
||||
|
||||
@ -39,5 +67,26 @@ function PlayerInfo.prototype:CreateIconFrames(parent, direction, buffs, type)
|
||||
return buffs
|
||||
end
|
||||
|
||||
function PlayerInfo.prototype:Enable(core)
|
||||
PlayerInfo.super.prototype.Enable(self, core)
|
||||
|
||||
if (self.moduleSettings.hideBlizz) then
|
||||
self:HideBlizz()
|
||||
end
|
||||
end
|
||||
|
||||
function PlayerInfo.prototype:ShowBlizz()
|
||||
BuffFrame:Show()
|
||||
|
||||
BuffFrame:RegisterEvent("UNIT_AURA");
|
||||
end
|
||||
|
||||
|
||||
function PlayerInfo.prototype:HideBlizz()
|
||||
BuffFrame:Hide()
|
||||
|
||||
BuffFrame:UnregisterAllEvents()
|
||||
end
|
||||
|
||||
-- Load us up
|
||||
IceHUD.PlayerInfo = PlayerInfo:new()
|
||||
|
Reference in New Issue
Block a user