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