Skip to content

Commit

Permalink
think this is only broke on retail, others might double click otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Apr 13, 2024
1 parent ea73e68 commit 227aeda
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ElvUI/Core/Modules/Misc/RaidUtility.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ ShowButton:SetClampedToScreen(true)
ShowButton:SetClampRectInsets(0, 0, -1, 1)
ShowButton:Hide()

function RU:FixSecureClicks(button)
if E.Retail then
button:RegisterForClicks('AnyDown', 'AnyUp')
else
button:RegisterForClicks('AnyUp')
end
end

function RU:SetEnabled(button, enabled, isLeader)
if button.SetChecked then
button:SetChecked(enabled)
Expand Down Expand Up @@ -548,13 +556,13 @@ function RU:Initialize()
MainTankButton:SetAttribute('type', 'maintank')
MainTankButton:SetAttribute('unit', 'target')
MainTankButton:SetAttribute('action', 'toggle')
MainTankButton:RegisterForClicks('AnyDown', 'AnyUp')
RU:FixSecureClicks(MainTankButton)

local MainAssistButton = RU:CreateUtilButton('RaidUtility_MainAssistButton', RaidUtilityPanel, 'SecureActionButtonTemplate', BUTTON_WIDTH * 0.49, BUTTON_HEIGHT, 'TOPLEFT', MainTankButton, 'TOPRIGHT', 3, 0, _G.MAINASSIST, nil, buttonEvents, RU.OnEvent_MainAssistButton)
MainAssistButton:SetAttribute('type', 'mainassist')
MainAssistButton:SetAttribute('unit', 'target')
MainAssistButton:SetAttribute('action', 'toggle')
MainAssistButton:RegisterForClicks('AnyDown', 'AnyUp')
RU:FixSecureClicks(MainAssistButton)

local RaidCountdownButton
if hasCountdown then
Expand Down

0 comments on commit 227aeda

Please sign in to comment.