Skip to content

Commit 957c731

Browse files
Fix: Flyoutbutton open/close on both button up and down when cvar setting wrong
1 parent c5b095f commit 957c731

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Mixin/Spellflyout.mixin.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,22 @@ function DragonflightUISpellFlyoutButtonMixin:InitButtons()
275275
frame:SetFrameRef("attributeFrame", attributeFrame);
276276
handler:SetFrameRef("attributeFrame", attributeFrame);
277277

278+
handler:WrapScript(self, 'OnClick', [[
279+
-- print('wraped OnClick', self:GetName(), button, down)
280+
281+
local useKeyDown = control:GetAttribute("ActionButtonUseKeyDown")
282+
-- print('useKeyDown',useKeyDown)
283+
284+
if down == useKeyDown then
285+
return "LeftButton"
286+
end
287+
return false
288+
]])
289+
290+
-- handler:WrapScript(frame, 'OnClick', [[
291+
-- print('wraped OnClick', self:GetName(), button, down)
292+
-- ]])
293+
278294
--
279295
local t = {}
280296
for i = 1, self.MaxButtons do

0 commit comments

Comments
 (0)