How do I target raid frames with click & NOT release?

Currently when in a raid group, I have to left click and release to target someone. How do I make it so it targets that person when I press down left click and not upon release?

I’m assuming this is some sort of setting, since when I play TBCC, this setting that I am asking for is default I believe.

I can’t comment on TBC or any cvar that adds this ability, but it’s relatively trivial for an addon to do it.

frame:RegisterForClicks("AnyDown")

For raid frames the tricky part will be applying that as they come into existence.

How would I apply this? I’m very noob when it comes to UI modification and don’t know how to apply code.

Do you want this to speed up healing or something? Because there’s better ways.

I just want this, as it’s my own preference. No disrespect but I don’t really care about alternatives, I just want to target people by pressing down left click.

2 Likes

Untested, but try the following:

local function update()
  for i=1,40 do
    local button = _G["CompactRaidFrame"..i]
    if button then
      button:RegisterForClicks("AnyDown")
    end
  end
end
hooksecurefunc("CompactRaidFrameContainer_AddUnitFrame",update)
update()

Use https://addon.bool.no/ to turn it into an addon.

Things to test:

  • Does it give an error when people join/leave the raid in combat? (I can’t think why RegistForClicks would be protected, but it may be.)
  • Does it work on a /reload while in a raid?
  • Does it work on a /reload while in a raid in combat?
1 Like

As far as I can tell, this works. Thanks so much, I’ll let you know if I run into any issues. :slight_smile:

the only issue i found from this is that if you check “keep groups together,” it does not work. otherwise, it works well. thank you. i was trying to figure out what my issue was with targeting and this makes sense.

+1, I can confirm the same issue. I don’t have much to complain about since I play with the raid group sorting setting that does not cause issues.

This has been driving me crazy for 2 weeks. I couldnt figure out what was causing my targeting lag and blizzard support didnt really help much.
This worked !! Thank you so much

1 Like