From 854b9098eae0853281a026df59dab584c03446c8 Mon Sep 17 00:00:00 2001 From: Casey Raethke Date: Wed, 21 Sep 2022 10:34:00 -0500 Subject: [PATCH] Improve ColorPickerFrame dragging --- RatingBuster.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/RatingBuster.lua b/RatingBuster.lua index d9a838c..3374514 100644 --- a/RatingBuster.lua +++ b/RatingBuster.lua @@ -161,7 +161,13 @@ ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG") ColorPickerFrame:SetMovable(true) ColorPickerFrame:EnableMouse(true) ColorPickerFrame:RegisterForDrag("LeftButton") -ColorPickerFrame:SetScript("OnDragStart", ColorPickerFrame.StartMoving) +ColorPickerFrame:SetScript("OnDragStart", function(self, button) + for _, frame in ipairs(C_System.GetFrameStack()) do + if frame == ColorPickerFrameHeader then + ColorPickerFrame:StartMoving() + end + end +end) ColorPickerFrame:SetScript("OnDragStop", ColorPickerFrame.StopMovingOrSizing) ColorPickerFrame:Show()