Add keybind to toggle main window
rdw-software opened this issue ยท 6 comments
I don't really like mini map buttons. In fact, I tend to hide them altogether - and that's why I'd rather have a keybind to quickly show/hide the addon's frame.
It shouldn't be difficult to do, so that will definitely be something I could look into if I have some time. Otherwise, this'll serve as a reminder to anyone interested :)
thanks. i've added another issue to track to add an option menu to configure. would likely tie in with this one. ( #14 )
i need a better understanding of how to do this in ace...so need to shelve again. hopefully next milestone.
The keybinds have nothing to do with Ace? Or do you mean because of the configuration GUI?
Simply add this to your initialisation routine:
-- Register keybinds
BINDING_HEADER_<addonName> = L["<addonName>"]
_G["BINDING_NAME_<addonName>_<bindingName>"] = L["<description of keybind>"]
And to actually add the functionality you need a bindings.xml file (will be automatically scanned for, so no entry in the .TOC is necessary).
For more info, check out this wowpedia link :)
thanks. Ace has an option but the more i read the more it seems it was never fully implemented. i wanted to do the keybinding from the addon location in the config - however it seems the way most people do this is in the keybinding menu. i'll do a little more investigation on this and might include in in a 1.5.x minor release.
Thanks for the help.
You can implement manual keybind settings as described in the wowpedia article. However, that introduces additional complexity and, to me, seems very unintuitive to boot.
Personally, I believe adding it to the Blizzard interface is how they intend things to be. As far as I know, they added that retroactively because the original, hand-crafted solution caused many issues. It's also very simple, so there is no reason not to use it :)