From e107ac2b97960dcbdda218672e6120f5c0d7925c Mon Sep 17 00:00:00 2001 From: robin Date: Thu, 29 Apr 2021 15:31:20 +0200 Subject: [PATCH] Add fixes.lua for temporary fixes --- fixes.lua | 16 ++++++++++++++++ pack.xml | 1 + 2 files changed, 17 insertions(+) create mode 100644 fixes.lua diff --git a/fixes.lua b/fixes.lua new file mode 100644 index 0000000..5b4d9c6 --- /dev/null +++ b/fixes.lua @@ -0,0 +1,16 @@ +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) \ No newline at end of file diff --git a/pack.xml b/pack.xml index 1dbe3a6..2e6b1dd 100644 --- a/pack.xml +++ b/pack.xml @@ -6,6 +6,7 @@