mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Version 0.9
- New round bar texture - Standalone druid mana bar - Lots of stuff I can't remember
This commit is contained in:
57
IceHUD.lua
57
IceHUD.lua
@ -1,6 +1,6 @@
|
||||
IceHUD = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0", "AceDebug-2.0")
|
||||
|
||||
IceHUD.dewdrop = AceLibrary("Dewdrop-2.0")
|
||||
local waterfall = AceLibrary("Waterfall-1.0")
|
||||
|
||||
IceHUD.Location = "Interface\\AddOns\\IceHUD"
|
||||
IceHUD.options =
|
||||
@ -356,18 +356,10 @@ IceHUD.options =
|
||||
},
|
||||
|
||||
|
||||
|
||||
headerModulesBlank = { type = 'header', name = ' ', order = 40 },
|
||||
headerModules = {
|
||||
type = 'header',
|
||||
name = 'Module Settings',
|
||||
order = 40
|
||||
},
|
||||
|
||||
modules = {
|
||||
type='group',
|
||||
desc = 'Module configuration options',
|
||||
name = 'Modules',
|
||||
name = 'Module settings',
|
||||
args = {},
|
||||
order = 41
|
||||
},
|
||||
@ -403,17 +395,7 @@ IceHUD.options =
|
||||
end,
|
||||
order = 91
|
||||
},
|
||||
|
||||
reset = {
|
||||
type = 'execute',
|
||||
name = '|cffff0000Reset|r',
|
||||
desc = "Resets all IceHUD options - WARNING: Reloads UI",
|
||||
func = function()
|
||||
StaticPopup_Show("ICEHUD_RESET")
|
||||
end,
|
||||
order = 92
|
||||
},
|
||||
|
||||
|
||||
debug = {
|
||||
type = "toggle",
|
||||
name = "Debugging",
|
||||
@ -424,6 +406,16 @@ IceHUD.options =
|
||||
set = function(value)
|
||||
IceHUD.IceCore:SetDebug(value)
|
||||
end,
|
||||
order = 92
|
||||
},
|
||||
|
||||
reset = {
|
||||
type = 'execute',
|
||||
name = '|cffff0000Reset|r',
|
||||
desc = "Resets all IceHUD options - WARNING: Reloads UI",
|
||||
func = function()
|
||||
StaticPopup_Show("ICEHUD_RESET")
|
||||
end,
|
||||
order = 93
|
||||
},
|
||||
|
||||
@ -436,31 +428,17 @@ IceHUD.options =
|
||||
end,
|
||||
order = 94
|
||||
},
|
||||
|
||||
endSpace = {
|
||||
type = 'header',
|
||||
name = ' ',
|
||||
order = 1000
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IceHUD.slashMenu =
|
||||
{
|
||||
type = 'execute',
|
||||
func = function()
|
||||
if not (IceHUD.dewdrop:IsRegistered(IceHUD.IceCore.IceHUDFrame)) then
|
||||
IceHUD.dewdrop:Register(IceHUD.IceCore.IceHUDFrame,
|
||||
'children', IceHUD.options,
|
||||
'point', "BOTTOMLEFT",
|
||||
'relativePoint', "TOPLEFT",
|
||||
'dontHook', true
|
||||
)
|
||||
end
|
||||
|
||||
if not (UnitAffectingCombat("player")) then
|
||||
IceHUD.dewdrop:Open(IceHUD.IceCore.IceHUDFrame)
|
||||
waterfall:Open("IceHUD")
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cff8888ffIceHUD|r: Combat lockdown restriction." ..
|
||||
" Leave combat and try again.")
|
||||
@ -468,6 +446,7 @@ IceHUD.slashMenu =
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
StaticPopupDialogs["ICEHUD_RESET"] =
|
||||
{
|
||||
text = "Are you sure you want to reset IceHUD settings?",
|
||||
@ -482,7 +461,6 @@ StaticPopupDialogs["ICEHUD_RESET"] =
|
||||
}
|
||||
|
||||
|
||||
|
||||
function IceHUD:OnInitialize()
|
||||
self:SetDebugging(false)
|
||||
self:Debug("IceHUD:OnInitialize()")
|
||||
@ -494,7 +472,6 @@ end
|
||||
function IceHUD:OnEnable()
|
||||
self:Debug("IceHUD:OnEnable()")
|
||||
|
||||
|
||||
self.IceCore:Enable()
|
||||
self:SetDebugging(self.IceCore:GetDebug())
|
||||
self.debugFrame = ChatFrame2
|
||||
@ -502,6 +479,8 @@ function IceHUD:OnEnable()
|
||||
self.options.args.modules.args = self.IceCore:GetModuleOptions()
|
||||
self.options.args.colors.args = self.IceCore:GetColorOptions()
|
||||
|
||||
waterfall:Register("IceHUD", 'aceOptions', IceHUD.options)
|
||||
|
||||
self:RegisterChatCommand({ "/icehud" }, IceHUD.slashMenu)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user