Kong Automatic UI Hider

Kong Automatic UI Hider can fade out pieces of the user interface (Minimap, PlayerFrame, Recount, etc.) and then automatically show them again when moused-over, entering combat, or any of several other user-specified conditions are met.

Type /Kong in game to access the config GUI. Kong can automatically fade things in and out based on things like:

Unit in Combat

Unit in Vehicle

Unit Health Level

Unit Power Level (Mana, Rage, Focus, etc)

Unit is Casting

Unit is Moving and Unit Speed

Unit is Mounted

Unit is Resting

Unit Exists (You have a target, focus, etc)

Unit is Unit (Player is Target of Target, etc)

Instance Type (Dungeon, Raid, Battleground, Arena, or None)

Mouseover

And also any macro condition:

[actionbar:1/.../6] or [bar:1/.../6] — Given action bar page is selected

[bonusbar:5] — The possess bar is active (controlling a vehicle or another player)

Binding a key to the "Toggle UI Fading On/Off" entry under Kong Automatic UI Hider in the Blizzard Key Bindings menu will allow you to quickly display all hidden frames when needed.

Version 1.6a

- Fixed an error that would occur when hiding frames in combat or in a vehicle.

Version 1.6

- Child frames (e.g. individual action buttons, raid member frames, etc.) can now be faded by right clicking the parent frame in the config screen and selecting 'Configure Children'.
- Added events Quest Acceptance and Quest Update to condition menu.

Version 1.5

- Added new conditions Unit in Range of Spell and Event Occurred Recently.
- Added convenience conditions Unit Health is Low, Unit Power is Low, and Unit in Instance as alternatives to setting up more complicated comparison conditions.
- Added a keybinding to open the config GUI.
- Fixed a error that would occur when attempting to apply a user-entered value to multiple frames at once.
- Fixed a bug where the Unit is Resting condition would not update properly when entering or leaving an instance.

Version 1.4e

- Fixed incompatibilities with TukUI.

Version 1.4d

- Fixed a bug that prevented the Target of Unit condition from working correctly.

Version 1.4c

- Fixed a bug that prevented Unit Power conditions from working correctly.

Version 1.4b

- The input field of the user-entered value popup will now default to the previous user-entered value, if any.
- Fixed an error that could occur when the conditions of a recently unregistered frame were met (I mean it this time).

Version 1.4a

- Fixed an error that could occur when the conditions of a recently unregistered frame were met.
- Fixed an error that could occur when closing the config GUI.
- Fixed a bug that caused the minimap to remain hidden when Kong was disabled.
- Reverted back to the old fading method to avoid graphical issues caused by the Blizzard animation API (e.g. Grid background).

Version 1.4

- Invalid conditions (e.g macro conditions missing square brackets [] and comparisons of different data types) will now appear in red.
- Added descriptions that summarize each condition.
- Added a Unit is Mounted condition.
- Various GUI tweaks to improve clarity.
- Fixed a bug that could erase all settings when the Config GUI was loaded using an addon like ACP but never actually displayed.
- Fixed a bug that caused the sync button to create copies of conditions with user-entered values cleared.
- Kong now uses the Blizzard animation API to perform fading for increased efficiency.

Version 1.3

- Completely overhauled the way conditions are specified to provide more power and flexibility in determining when frames are shown.
- Several new conditions are available including Power Level (Mana, Energy, Rage, etc.), Instance Type (Dungeon, Arena, etc), Resting State, Unit Motion, and others.

Version 1.2b

- Each section of the config GUI is now collapsible. Sections will be automatically collapsed when they aren't in use.
- Fixed a Lua error that could occur after loading an area with the config GUI open.
- Fixed a bug that prevented Kong from finding the names of frames that had numeric or boolean values in them (e.g. ElkBuffBars).
- Fixed a bug that could cause frames to become unregistered if they changed parents between sessions or if profiles were shared between characters.
- Various other config GUI tweaks.

Version 1.2a

- Fixed a bug that was preventing frames with non-alphanumeric characters in their names from saving between sessions (e.g. "DominosActionButton-11").

Version 1.2

- Added support for showing frames based on health.
- Added an Override Alpha option in the Advanced section for use with frames that set their own alphas. This replaces the default functionality from version 1.0 that was causing tainting issues.
- Added a Don't Draw when Hidden option in the Advanced section for frames that don't fade out properly.
- Fixed a bug in Blizzard's code that causes 3D models to appear regardless of their alpha.
- Fixed a error that could occur when loading frames.

Version 1.1a

- Full support for frames that are loaded anytime after login. Kong will no longer unregister frames that it can't find initially.
- Improved support for saving unnamed frames between game sessions. See the 'Advanced' section in the GUI for frames that could not be saved previously.
- Added a "/kong reset" command that can be used to clear all settings from the current profile.
- Fixed a bug that would prevent frames from appearing on mouseover the first time Kong was loaded.

Version 1.0a

- Added a configuration GUI that can be accessed by typing /kong
- Fixed an issue with addons that continually set frame alpha (e.g. Dominos)
- Added the word "Automatic" to the addon name in an attempt to better describe the addon's functionality and prevent confusion among those who might think "Kong UI" is a UI compilation.

Version 0.9c

- Fixed a bug that was preventing users on from being able to manipulate the default profiles for characters on realms with spaces in their names.
- Fixed an error that would occur when using /kong show on a frame that was part of a mouseover group.
- Fixed an error that would occur when the in and out alpha of a frame or trigger were set to the same value.
- Fixed an error that would occur if a user omitted the word "in" or "out" when setting fade speed.
- Fixed an error that could occur when Kong attempted to fade a frame that was already being faded using the UIFrameFadeIn/Out methods.
- Kong will now be able to find some additional late-loading frames.

Version 0.9b

- Fixed a bug that would cause frames to remain on screen after a member of a mouseover group was unregistered with /kong show.

Version 0.9a

- Fixed a bug introduced in version 0.9 that could prevent a frame's configuration from being saved between game sessions.

Version 0.9

- Added "/kong profile" for managing Kong configurations and sharing them between characters.
- Added "/kong casting" to configure frames to appear while casting.
- Fixed a bug that could cause frames to disappear when faded in and out at the same time.

Version 0.8a

- Minimap icons will now be hidden along with the minimap itself.
- Minimap terrain should now always be visible when the minimap is at least 88% alpha. This is a workaround for a Blizzard minimap bug that causes the minimap contents to disappear when it is faded out in certain areas of the world.
-Fixed a bug that could cause frames to remain either hidden or shown after entering certain vehicles or being picked up in a boss fight (Chopper sidecar, Archavon, Kologarn, Lord Jaraxxus, etc.).
-Fixed a bug could cause frames to remain hidden after zoning in or out of an instance.

Version 0.8

- Added "/kong group" to configure frame grouping. This allows multiple frames to appear when a single frame is moused-over.
- Fixed a bug that was preventing "/kong nocombat" from working correctly.

Version 0.7

- Added "/kong macro" to configure frames to appear when a given macro condition is met.
- Added alpha commands for individual triggers (ie. "/kong combat alpha") to allow for different frame alphas under different conditions. Default frame alpha can still be set using "/kong alpha".
- Added speed commands for both frame defaults ("/kong speed") and individual triggers (ie. "/kong combat speed") to control the rate at which frames fade in or out.

- Added "/kong mouseover" to support customizations to the fade speed and alpha of frames when the mouse is moved over them.
- Added "/kong enable" and "/kong disable" commands and entries for these commands in the Key Bindings screen.
- Due to significant code structure changes, user settings from previous versions will be lost.

Version 0.6a

- Update for patch 3.1 compatibility.

Version 0.6

- Added an entry in the Key Bindings screen to allow quick toggling of UI fading on/off.
- Fixed a bug that would cause Kong to fade frames after reloading the UI even if Kong was disabled.

Version 0.5

- Added "/kong nocombat" to configue frames to appear when out of combat.
- Added "/kong vehicle" to configure frames to appear when in a vehicle.
- Fixed a bug that could cause a frame to fade out when it shouldn't.
- Fixed a bug that prevented "/kong combat" from working when not in combat.

Version 0.4

- Fixed a bug that would cause frames to be hidden at login when Kong was disabled.
- Fixed a bug that would cause frames to reappear after they had been removed from the screen (party frames out of party, etc).
- Fixed an "Interface action failed because of an AddOn" bug.
- Fixed a bug that caused registered frames to be permanently shown on screen when /kong combat was used in combat.
- Renamed to Kong UI Hider to (hopefully) make the addon more visible to those searching for its functionality.

Version 0.3

- Added the ability to control faded and shown alpha.
- Added the ability to toggle Kong on or off.
- Fixed a few nil index errors related to saving data between sessions, and added warnings to the default chat log when these issues occur.

Version 0.2

- Added the ability to configure frames to either appear in combat or stay hidden until mouseover.

This didn't start popping up until I hid a frame, then set its' mouseover alpha to 0 (I only want this particular frame to show when in combat).

**EDIT** Error seems to be relating to mousing over the item with 0 mouseover alpha. Hope that helps...

**EDIT #2** Found a quick-n-dirty solution by just setting the frame's mouseover alpha to 0.00000001. This apparently satisfies whatever behind-the-scenes math was going on. However...I think a simple "/kong mouseover hide" would be nice...

Originally posted by xtoq I'll try that, although before I didn't have to explicitly tell it to hide those frames in combat; the macro conditional was enough.

EDIT: Tried it, and that hides them when I'm in combat, even in a group. Which is not ideal, since the frames in question are important for being in a group. I actually want them to be visible all the time when I'm in a group, regardless of combat, which is the old behavior (v 0.9a). I don't mind if it has changed, just wanting to know if this is (new) intended behavior or not. I haven't reset my svars yet to see if there's maybe some corrupted information.

If you could, would you check the version against each other? As in, would you install the older .9a version and see if your behavior is the same as mine? I like the "old" way that it works better, as the macro conditionals trump the regular combat conditional. I think it makes sense, and its less work to set up your UI the way you need it.

The intended behavior is and has always been that whenever ANY condition becomes true, whether it be combat, vehicle, mouse-over, casting, or the user specified [macro condition], the frame is shown. You can set the alpha and fade speed for each of these conditions individually, so frames may not appear the same way for different conditions, but they should all display the frame (assuming you haven't set the alpha to 0 or the speed to something ridiculously long like 10 minutes to fade in).

The fact that you're seeing different behavior between 9a and 9b is really weird because the difference in the code is literally like 3 lines related to unregistering a frame with /show. There definitely wasn't any change made to combat behavior in 9b. If you had previously had your frames configured to stay hidden in combat then you would have had to have either issued the command /kong combat hide or /kong combat alpha 0 to keep things hidden in combat at some point in the past (unless there is some other insidious bug I'm unaware of).

Anyway, I can't explain the discrepancies that you're seeing. Sorry. I recommend you do /kong profile create and start fresh. Or you can delete your saved variable Kong.lua files from the WTF folder if you're comfortable with that. If you want to PM me your svars I'd be happy to take a look at them, but otherwise I'm afraid you have me stumped.

Originally posted by xentaros Make sure you're using /kong combat hide. It does sounds suspicious that this would change between versions though. I'll have to look at it tonight.

I'll try that, although before I didn't have to explicitly tell it to hide those frames in combat; the macro conditional was enough.

EDIT: Tried it, and that hides them when I'm in combat, even in a group. Which is not ideal, since the frames in question are important for being in a group. I actually want them to be visible all the time when I'm in a group, regardless of combat, which is the old behavior (v 0.9a). I don't mind if it has changed, just wanting to know if this is (new) intended behavior or not. I haven't reset my svars yet to see if there's maybe some corrupted information.

If you could, would you check the version against each other? As in, would you install the older .9a version and see if your behavior is the same as mine? I like the "old" way that it works better, as the macro conditionals trump the regular combat conditional. I think it makes sense, and its less work to set up your UI the way you need it.

__________________There is absolutely no evidence to support the theory that life is serious.

Hi been using Kong for a while now, love it. After the latest update to version 0.9b, my frames that I have set to only show when I'm in a group show when I'm solo as soon as I enter combat. Previous to this version, when I was solo, they would never appear unless I moused over them, regardless of combat. Typing /kong macro get while over the frames tells me that the macro conditional is set to [group], but the frames still show during combat while not in a group. Rolling back to v 0.9a corrects this issue. I did unregister the frames and set up the macro conditionals again, with the same results. I have not reset my svars yet, as it took a while to set up in the first place, but I will try that later after our raids. I figured you might know what was wrong and I wouldn't have to reset my svars... Thanks for your hard work.

EDIT: Department of Redundancy Department. D'oh!

__________________There is absolutely no evidence to support the theory that life is serious.

Originally posted by xentaros There was a bug in version 0.9 that could prevent frames from being saved. You would have gotten a warning after the loading screen saying LastFocus or LastRoot could not be saved.

Try version 0.9a and let me know if you're still having the problem.

For whatever reason, I did not get any warnings. Though, I did completely uninstall Kong and applicable saved variables, reinstall 0.9a and redo my settings. So far, so good! If anything strange happens, I will let you know. As always, you have my thanks.