Add a keybind for opening the UI's main window
rdw-software opened this issue ยท 2 comments
Source: Discord
I would love the ability to set a key bind to show / hide the main menu instead of mousing over a broker (if that is what its called)
Update: This has essentially been requested again here.
A slash command would also do, and since it's the same functionality maybe both should be offered.
Once again I am defeated by the mountains of spaghetti code: What should be a trivial task simply isn't possible right now, since there are too many weird glitches and errors when trying to render the LibQTip frame independently of the existing logic. I was expecting this to take five minutes, but after several hours this is all I've got:
I've managed to create a keybinding that would show the window briefly, but only after it had been rendered at least once manually, i.e., by hovering over the mini map button. It fades automatically due to (I assume) the fact it's designed to be hovered over to show and therefore to hide when the cursor isn't present.
I have no idea why it won't show until the addon has rendered it normally, but I'm guessing the convoluted initialization and tooltip acquisition logic is to blame. Something is responsible for building the tooltip and it isn't doing it correctly with this method. What's worse, after a failed initialization attempt the UI seems to completely bug, but only sometimes, resulting in the UI not working at all even when hovering over the mini map button normally.
The only way I see this going anywhere is if the main window (and possibly other, related UI code) is refactored to actually become maintainable. Needless to say, there's a reason this hasn't happened yet, and it's because there be dragons. Considering the low priority of this issue, I can only shelve this and possibly revisit it again in the distant future, when someone bold and fearless has managed to untangle the mess.