- fixed /icehudcl to actually work again as a command-line interface to the options table (surprised this wasn't reported)

- made the OpenConfig method able to close the dialog if it's already open. this restores old behavior that was lost in the move to ace3
This commit is contained in:
Parnic
2010-10-10 01:05:09 +00:00
parent e68b509448
commit 1471a96937

View File

@ -873,7 +873,7 @@ function IceHUD:OnInitialize()
self:SetupProfileImportButtons() self:SetupProfileImportButtons()
--@end-debug@ --@end-debug@
LibStub("AceConfig-3.0"):RegisterOptionsTable("IceHUD", self.options, "/icehudcl") LibStub("AceConfig-3.0"):RegisterOptionsTable("IceHUD", self.options, "icehudcl")
ConfigDialog:SetDefaultSize("IceHUD", 750, 650) ConfigDialog:SetDefaultSize("IceHUD", 750, 650)
self:RegisterChatCommand("icehud", function() self:RegisterChatCommand("icehud", function()
@ -1076,8 +1076,12 @@ InterfaceOptions_AddCategory(blizOptionsPanel)
function IceHUD:OpenConfig() function IceHUD:OpenConfig()
if not ConfigDialog then return end if not ConfigDialog then return end
if ConfigDialog.OpenFrames["IceHUD"] ~= nil then
ConfigDialog:Close("IceHUD")
else
ConfigDialog:Open("IceHUD") ConfigDialog:Open("IceHUD")
end end
end
function IceHUD:Debug(msg) function IceHUD:Debug(msg)
if self.debugging then if self.debugging then