WoWInterface (
-   AddOn Search/Requests (
-   -   Fading frames until I mouseover (

Igrac813 07-20-20 04:42 PM

Fading frames until I mouseover
I have been playing around with /run RegisterStateDriver(Minimap, "visibility", "[combat] hide; show") and it has helped a lot to clean up my frames in combat.

It got me thinking that I would like to hide a lot of frames even when out of combat to have a more immersive look.

Is there an easy script to run that can target frames to hide until I mouseover?

I did see some threads like this one but they were a bit over my head. Should I read some articles on how to run these programming type codes? If so let me know. I don't mind doing the reading. It's just a lot at once.

LudiusMaximus 07-21-20 01:23 PM

Something like that?


local myFrame = PlayerFrame -- Your frame here.
myFrame:HookScript("OnEnter", function(self) self:SetAlpha(1) end)
myFrame:HookScript("OnLeave", function(self) self:SetAlpha(0) end)

Igrac813 07-21-20 01:50 PM

That is what I am looking for I believe.
How would I go about executing that code?

LudiusMaximus 07-21-20 01:58 PM


Originally Posted by Igrac813 (Post 336429)
How would I go about executing that code?

If you want to run it in game or as a macro, precede the code with /run and paste it into the console. You can simply ignore every line break.

Or create your own addon that gets executed after every UI reload.
You can simply paste the code here and get your first addon:

Tim 07-22-20 12:19 PM


  for _, frame in pairs({
      "TargetFrame", -- you can keep adding more frames
  }) do
      frame:HookScript("OnEnter", function(self) self:SetAlpha(1) end)
      frame:HookScript("OnLeave", function(self) self:SetAlpha(0) end)

All times are GMT -6. The time now is 11:11 AM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI