You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
643 B
25 lines
643 B
local _, addon = ...
|
|
|
|
-- TODO: remove these after resolving dependents
|
|
|
|
function addon:OpenSettings(name)
|
|
if addon:IsRetail() then
|
|
Settings.OpenToCategory(name)
|
|
else
|
|
InterfaceOptionsFrame_OpenToCategory(name)
|
|
InterfaceOptionsFrame_OpenToCategory(name) -- load twice due to an old bug
|
|
end
|
|
end
|
|
|
|
function addon:HookSettings(callback)
|
|
if addon:IsRetail() then
|
|
SettingsPanel:HookScript('OnShow', callback)
|
|
else
|
|
InterfaceOptionsFrameAddOns:HookScript('OnShow', function(frame)
|
|
callback(frame)
|
|
|
|
-- we load too late, so we have to manually refresh the list
|
|
InterfaceAddOnsList_Update()
|
|
end)
|
|
end
|
|
end
|
|
|