Quantcast
Fading frames until I mouseover - WoWInterface
Thread Tools Display Modes
07-20-20, 04:42 PM   #1
Igrac813
A Defias Bandit
Join Date: Jul 2020
Posts: 3
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 https://www.wowinterface.com/forums/...ad.php?t=55800 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.
  Reply With Quote
07-21-20, 01:23 PM   #2
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Something like that?

Code:
local myFrame = PlayerFrame -- Your frame here.
myFrame:SetAlpha(0)
myFrame:HookScript("OnEnter", function(self) self:SetAlpha(1) end)
myFrame:HookScript("OnLeave", function(self) self:SetAlpha(0) end)
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
07-21-20, 01:50 PM   #3
Igrac813
A Defias Bandit
Join Date: Jul 2020
Posts: 3
That is what I am looking for I believe.
How would I go about executing that code?
  Reply With Quote
07-21-20, 01:58 PM   #4
LudiusMaximus
A Cobalt Mageweaver
 
LudiusMaximus's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2018
Posts: 227
Originally Posted by Igrac813 View Post
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:
https://addon.bool.no
__________________
~ Be the change you want to see in the world... of warcraft interface! ~
  Reply With Quote
07-22-20, 12:19 PM   #5
Tim
A Frostmaul Preserver
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 285
Code:
do
   for _, frame in pairs({
      "PlayerFrame",
      "TargetFrame", -- you can keep adding more frames
   }) do
      frame:SetAlpha(0)
      frame:HookScript("OnEnter", function(self) self:SetAlpha(1) end)
      frame:HookScript("OnLeave", function(self) self:SetAlpha(0) end)
   end
end
__________________
AddOns: Tim @ WoWInterface
Characters: Hunter, Mage, Priest, Monk, DH,
Battle Tag: Tim#11172
Current PC Setup: PCPartPicker List
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Fading frames until I mouseover

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off