Only SetScript and HookScript on intialization of plugin frames

This commit is contained in:
Flamanis
2023-04-11 17:36:12 -05:00
parent 074e0c42e7
commit 37ed706a26
+8 -4
View File
@@ -647,14 +647,17 @@
local on_hide = function(self)
DetailsPluginContainerWindow.ClosePlugin()
end
function f.RefreshFrame (frame)
frame:EnableMouse(false)
frame:SetSize(f.FrameWidth, f.FrameHeight)
local setup_frame_functions = function(frame)
frame:SetScript("OnMouseDown", nil)
frame:SetScript("OnMouseUp", nil)
--frame:SetScript("OnHide", on_hide)
frame:HookScript ("OnHide", on_hide)
end
function f.RefreshFrame (frame)
frame:EnableMouse(false)
frame:SetSize(f.FrameWidth, f.FrameHeight)
frame:ClearAllPoints()
PixelUtil.SetPoint(frame, "topleft", f, "topleft", 0, 0)
frame:Show()
@@ -715,6 +718,7 @@
--format the plugin main frame
f.RefreshFrame(frame)
setup_frame_functions(frame)
--save the callback function for when clicking in the button from the options panel
pluginObject.__OnClickFromOptionsCallback = callback