If you use the default blizzard player/unit frames, there is often little need for the player frame to be shown at all times (i.e. when you are not in combat, have no target, etc). Especially for people that move their player frame to the center of the screen, it is just unnecessary clutter in these situations.
This is an extremely minimal and lightweight addon that solves that exact problem. By default, it will show the player frame only if one of the following conditions are met (see slash command options below for details on how to change these settings):
- The player has a target (can be disabled)
- The player is in combat (or has aggro)
- The mouse cursor is over the player frame (this is disabled by default)
- The player is in an instance (this is disabled by default)
- The player's health is below a defined threshold (available on Classic versions ONLY!)
- The player's power is below/above a defined threshold (available on Classic versions ONLY!)
Otherwise, the player frame will be hidden, by setting its alpha transparency to 0, and disabling mouse interaction to make it "non-interactive" (this behavior change changed in the slash command settings).
NOTE: Since WoW Midnight introduced changes to the Addon API restricting access to "secret values" in the context of secure frames (e.g. the default Player Frame), this addon can no longer support functionality relating to showing the frame when the player's HP/power crosses a certain threshold. 😢
Slash Commands
The behavior of the addon can be configured using the following slash commands:
- /playerframe help - shows all available commands
- /playerframe settings - shows currently configured option values
- /playerframe interactive on|off - (default: off) setting this option to "on" causes the player frame to be hoverable/clickable when it is hidden.
- /playerframe target on|off - (default: on) setting this option to "off" causes the player to NOT be shown if you have a target.
- /playerframe mouseover on|off - (default: off) setting this option to "on" causes the player frame to be shown when the mouse cursor is over it.
- /playerframe instance on|off - (default: off) setting this option to "on" causes the player frame to always be shown when you are in an instance (dungeon, raid, battleground, arena, scenario/delve)
- /playerframe health 0-100|off (default: 100) (CLASSIC ONLY!) setting this option to a value between 0-100 will cause the player frame to be shown when the player's health % is below the given value.
- /playerframe power 0-100|off (default: off) (CLASSIC ONLY!) setting this option to a value between 0-100 will cause the player frame to be shown when the player's power (mana, energy, etc) % is below (or above, if the class power "decays", e.g. rag) the given value.
- /playerframe opacity 0-99 (default: 0) the opacity/transparency % level of the player frame when it is "hidden" (0 is completely invisible).
GitHub Repository: https://github.com/billdami/wow-player-frame-smart-hide

