Fixed up debugging

Apparently isFirst is no longer passed to OnEnable, so we were never setting a debug frame.
Made the additional arguments that were being passed to Debug() actually do something (currently print out a stringified version of themselves in a space-delimited string)
This commit is contained in:
Parnic
2016-05-17 23:19:14 -05:00
parent 3aef209816
commit 2a98dc961d

View File

@ -272,10 +272,10 @@ function IceHUD:OnEnable(isFirst)
IceHUD_Options:OnLoad()
--@end-debug@
if isFirst then
-- if isFirst then
self:SetDebugging(self.IceCore:GetDebug())
self.debugFrame = ChatFrame2
end
self.debugFrame = ChatFrame1
-- end
end
-- add settings changes/updates here so that existing users don't lose their settings
@ -358,8 +358,12 @@ function IceHUD:LoadOptions()
return true
end
function IceHUD:Debug(msg)
function IceHUD:Debug(...)
if self.debugging then
local msg = ""
for n=1,select('#', ...) do
msg = msg .. tostring(select(n, ...)) .. " "
end
self.debugFrame:AddMessage(msg)
end
end