Download
(3Kb)
Download
Updated: 07-12-23 05:41 AM
Compatibility:
Fractures in Time (10.1.5)
Updated:07-12-23 05:41 AM
Created:02-07-23 07:26 AM
Downloads:52
Favorites:0
MD5:

Windex

Version: 0.1.4
by: zestyquarks [More]

I'm not going to be fancy with this, as that attracts those who want addons to be a mindless experience, which isn't quite the case here. Anyway, Windex is based upon the idea of an ESO addon. Its purpose is to keep your play area free of distractions.

You can add things to a database of frames to hide, or visually toggle. The toggle is on a hotkey. So if there's a lot of your interface you don't need to see all the time, you can toggle it on/off. The keybind is found in the bindings section.

The commands are as follows (both /windex and /wx work):

/wx s — Place the cursor over a frame, and use this to get the names of the frame and the parent of said frame. This also stores those frames for later use.
/wx i — Import a database of frames from the Import.lua file. If you know what you're doing enough to mess with lua files, this can make your life easier.
/wx w — Wipe the hide/toggle databases.
/wx l — Two numbered lists, of the frames being handled by the hide and toggle databases respectively.
/wx lt — A numbered list of all the frames being handled by the toggle database.
/wx lh — A numbered list of all the frames being handled by the hide database.
/wx t — Add the frame stored by /wx s to the toggle database.
/wx tp — Add the parent frame stored by /wx s to the toggle database.
/wx tn framename — Add a frame, by name, to the toggle database.
/wx h — Add the frame stored by /wx s to the hide database.
/wx hp — Add the parent frame stored by /wx s to the hide database.
/wx hn framename — Add a frame, by name, to the hide database.
/wx tr number — Remove a frame from the toggle database, number acquired from the /wx l command.
/wx hr number — Remove a frame from the hide database, number acquired from the /wx l command.

I could add a huge options interface but I don't want to when this works well enough for me. I don't want to bloat or go out of scope. I had thought about adding conditional databases for things like has target or combat, but I haven't really found a use for that. The only addons I'd want it for (such as action bar mods) have their own handlers for that. If I find a use, I might do it.

This is just something I made for myself and my partner. I'm sharing it. I don't expect it to gain a lot of traction but if someone out there uses it and likes it? That's a win for me.

I don't know if there are addons out there that do similar things, but this just does exactly what I want it to. I try to keep my addons as small as possible so they do just what you need them to and nothing else. In an age of giant addons, I think that's important.

0.1.4

* Toc bump.

0.1.3

* Toc bump.

0.1.2

* Windex is now more robust. The long version: What makes Windex more robust is running as closely to the end of the loading screen as possible, whether from login, UI reload, or area transition. I hadn't really found a magic bullet for this, so I'd been using PLAYER_ENTERING_WORLD. Unfortunately, Blizzard sets up some of their frames so late that that event isn't actually late enough in a few instances. Then I found PET_JOURNAL_LIST_UPDATE, which does load late enough for every test case I tried, including compact party/raid frames and the Legion class hall bar.
* Added the Legion order hall command bar to the import list.
* Windex shouldn't fubar on unexpectedly non-existent frames in any scenario now.

0.1.1

* I hemmed and hawed over this a bit but... Considering how easy it is to accidentally add UIParent, how it can break things, and how I can't think of a good use case for trying? I've now blocked UIParent's inclusion from the start. I don't like Big Brothering users, but... Like I said, preventing accidents is best practise, and probablistically it would be an accident rather than intentional.

0.1.0

* A while of testing with my patient partner and a lot of tested code configurations later? I think I've got it. This seems to handle all frames (including all that can safely be hidden/shown in combat), without causing taint. I'll keep poking it as I know this is a work in progress, but this is the closest I've gotten to perfect functionality, I haven't seen any problems so far. Tomorrow is, however, another day.

0.0.9

* The ongoing fight of functionality vs. taint. The restrictions were too strict, which made it so that hidden frames didn't always hide properly at initial login, only on a reload. Well, some, anyway. Problematic buggers like CompactPartyFrame notably. Let me know if you get taint.

0.0.8

* Some small code changes, and made sure all ENV calls were properly localised.

0.0.7

* Trying to use f:IsProtected() to avoid taint while allowing some toggling in combat. It should work, but if this still causes taint, I'll roll it back. I'm leaving the prior version up, because that way if this causes you taint whereas 0.0.6 didn't? You can roll it back without having to wait for me. Hopefully though, it won't. But since even Blizzard doesn't seem to fully understand how their own taint system works anymore, who knows??

0.0.6

* I fixed a couple more instances of taint:
- Combat, so InCombatLockdown dealt with that.
- So, if a UI frame isn't fully initialised, calling Hide on it causes taint but calling Show on it doesn't??? Blizzard, what did you do??
- Sadly, the above means that we're back to only working on frames which are initially visible. It's a necessary safety precaution as it does break things otherwise.

0.0.5

* You can no longer add a frame to both toggle and hide databases, that's naughty (because it'll break things). If you try, it'll tell you it's already in one database or the other (it now checks both). If you have a frame in both databases already, it's coded to prefer one. If it prefers the wrong one, remove it from the irrelevant database.

* Importing is now more robust, and does all the checks it should.

* The hide system will now call the Show method so that it's immediately obvious whether the hook is functioning correctly or not.

* You can now readd (after removing, in the same session) a frame that you removed, cleanly, without any issues. I did this by consolidating the toggle and hide systems to use a homogenised hook.

* If you try to add a frame that doesn't exist, it'll now tell you the frame name. This might seem like an odd inclusion, since you're supplying that frame, but there are use cases for it (such as importing).

* Removed the check for whether a frame is visible or not. An addon shouldn't take agency from the user, so long as their choices clearly won't break anything. It should be up to the user whether they want to toggle frames that start out invisible (thus making them visible).

* When wiping databases, all frames added to the hide database will be revealed again without requiring a UI reload.

* Fixed a bug with removing frames. Explanation: Typo.

* Fixed a bug with getting frames from /wx s. Explanation: Apparently it's worthless to check for frame.GetParent and frame.GetName, and it even can cause problems?? So I'm no longer running those checks to ensure those frame methods exist.

* Fixed a potential taint issue. Explanation: I found what I'm convinced was at least one rare case of non-viral taint. Viral taint plagues the entire Blizzard UI now, it can come from anywhere, it even happens in the base Blizzard UI itself. This, though, I was convinced came from my addon. I think—from testing—that there are certain times at which certain frames don't like having variable set on them, and that causes taint. It's supposed to be safe, but I've stopped doing that just in case.

* In order to properly refactor my code, I had to change the names of the import databases. They're now toggleimport and hideimport respectively. If you've altered the Import.lua, you can update it by changing the appropriate table names (toggled to toggleimport, and hidden to hideimport).

* Cleaned up some terminology used in the code, and did an optimisation and logic pass.

0.0.1

* Initial release on WoW Interface.
There have been no comments posted to this file.
Be the first to add one.



Category Jump: