WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Open to app Keybindings (https://www.wowinterface.com/forums/showthread.php?t=58299)

Stea 10-16-20 07:37 AM

Open to app Keybindings
 
My addon allows keybindings using the standard wow interface. I find a some people either have no idea where that is, or don't think to look there to set them. So I'd like to add an option in my context menu to open the blizzard keybindings window to the sub section for my addon, just like I have for the addon options. Is this possible? I've been poking around trying to find a function for this, but have not been successful.

Thanks

DahkCeles 10-16-20 06:01 PM

Lua Code:
  1. if (not KeyBindingFrame) then
  2.     KeyBindingFrame_LoadUI()
  3. end
  4. KeyBindingFrame:Show()

Stea 10-16-20 11:32 PM

Thanks, that did the trick. I added a search for the category I put my addon in, and I guess that's close enough:

Lua Code:
  1. if (not KeyBindingFrame) then
  2.    KeyBindingFrame_LoadUI()
  3. end
  4. if not InCombatLockdown() then
  5.   KeyBindingFrame:Show()
  6.   for _,v in pairs(KeyBindingFrame.categoryList.buttons) do
  7.     if v:GetText() == "AddOns" or v:GetText() == "ADDONS" then
  8.       v:Click()
  9.     end
  10.   end
  11. end


All times are GMT -6. The time now is 02:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI