zz_UI/fixes.lua

16 lines
661 B
Lua

local addonName, addon = ...
local childName = addon['childName']
local child = addon[childName]
local init = {
Setup = function(self, childName, event)
-- Remove the cancel button (Reduce the taint caused by InterfaceOptionsFrame src: http://www.wowinterface.com/forums/showpost.php?p=275119&postcount=17 )
InterfaceOptionsFrameCancel:Hide()
InterfaceOptionsFrameOkay:SetAllPoints(InterfaceOptionsFrameCancel)
-- Make clicking cancel the same as clicking okay
InterfaceOptionsFrameCancel:SetScript("OnClick", function()
InterfaceOptionsFrameOkay:Click()
end)
end
}
addon.RegisterCallback(init, format("Init%s", childName), 'Setup', childName)