@@ -274,35 +274,18 @@ function RM:CreateButtons()
274274 elseif i == 9 then -- Clear All
275275 tex :SetTexture (" Interface\\ BUTTONS\\ UI-GroupLoot-Pass-Up" )
276276
277- button :SetAttribute (" type" , " click" )
277+ button :ClearAttribute (" marker" )
278+ local prefix = strlower (RM .modifierString )
278279 if not self .db .inverse then
279- button :SetScript (" OnClick" , function ()
280- if _G [format (" Is%sKeyDown" , RM .modifierString )]() then
281- ClearRaidMarker ()
282- else
283- local now = GetTime ()
284- if now - lastClear > 1 then -- limiting
285- lastClear = now
286- for j = 8 , 0 , - 1 do
287- E :Delay ((8 - j ) * 0.34 , SetRaidTarget , " player" , j )
288- end
289- end
290- end
291- end )
280+ button :SetAttribute (prefix .. " -type*" , " worldmarker" )
281+ button :SetAttribute (prefix .. " -action*" , " clear" )
282+ button :SetAttribute (" type*" , " raidtarget" )
283+ button :SetAttribute (" action" , " clear-all" )
292284 else
293- button :SetScript (" OnClick" , function (btn )
294- if _G [format (" Is%sKeyDown" , RM .modifierString )]() then
295- local now = GetTime ()
296- if now - lastClear > 1 then -- limiting
297- lastClear = now
298- for j = 8 , 0 , - 1 do
299- E :Delay ((8 - j ) * 0.34 , SetRaidTarget , " player" , j )
300- end
301- end
302- else
303- ClearRaidMarker ()
304- end
305- end )
285+ button :SetAttribute (prefix .. " -type*" , " raidtarget" )
286+ button :SetAttribute (prefix .. " -action*" , " clear-all" )
287+ button :SetAttribute (" type*" , " worldmarker" )
288+ button :SetAttribute (" action" , " clear" )
306289 end
307290 elseif i == 10 then -- Ready Check & Combat Log
308291 tex :SetTexture (" Interface\\ RaidFrame\\ ReadyCheck-Ready" )
@@ -351,7 +334,7 @@ function RM:CreateButtons()
351334 if not self .db .inverse then
352335 tooltipText = format (
353336 " %s\n %s" ,
354- L [" Click to clear all marks." ] .. " " .. C . StringByTemplate ( L [ " takes 3s " ], " teal-400 " ) ,
337+ L [" Click to clear all marks." ],
355338 format (L [" %s + Click to remove all worldmarkers." ], RM .modifierString )
356339 )
357340 else
0 commit comments