mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
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:
22
IceHUD.lua
22
IceHUD.lua
@ -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"
|
||||
|
Reference in New Issue
Block a user