bug http://www.wowace.com/projects/ice-hud/tickets/16-visual-heal-support/ - added support for LibHealComm by request. not included with the mod, but listed as an opt dep

- added LDB support by request/from user-submitted code. this basically will only work if a mod that loads before icehud has LDB included
This commit is contained in:
Parnic
2009-03-20 01:54:50 +00:00
parent 6a361c7771
commit 955e25cfd2
4 changed files with 113 additions and 2 deletions

View File

@ -613,6 +613,8 @@ function IceHUD:OnInitialize()
self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu)
self:SyncSettingsVersions()
self:InitLDB()
end
@ -650,6 +652,26 @@ function IceHUD:SyncSettingsVersions()
end
end
function IceHUD:InitLDB()
local LDB = LibStub and LibStub("LibDataBroker-1.1", true)
if (LDB) then
local ldbButton = LDB:NewDataObject("IceHUD", {
type = "launcher",
text = "IceHUD",
icon = "Interface\\Icons\\Spell_Frost_Frost",
OnClick = function(_, msg)
if not (UnitAffectingCombat("player")) then
waterfall:Open("IceHUD")
else
DEFAULT_CHAT_FRAME:AddMessage("|cff8888ffIceHUD|r: Combat lockdown restriction. Leave combat and try again.")
end
end,
})
end
end
-- fubar stuff
IceHUD.OnMenuRequest = IceHUD.options
IceHUD.hasIcon = "Interface\\Icons\\Spell_Frost_Frost"