ive benn looking into adding key bindings to the profesions addon i did and was hoping you could help me learn how
i pretty sure i will have to add a .xml file to it but im not sure what if anything im saposed to add to the code itself or ware im saposed to add it at
thanx in advance for your time
You need a couple of things to make key bindings work. First, you'll need an xml file that defines what key bindings your addon supports. I've attached the key binding file for nUI to this message. Each line in the file defines the bindings for a single button. The first line of each section or group of buttons also references the text label that will be displayed...
The binding name defines the type of binding (CLICK), the button the key binding belongs to (nUI_ActionBar_Button1), the type of click (LeftButton), the key binding label for that button (nUI_ACTIONBAR1) and optionally a heading (nUI_ACTIONBAR) -- a new "group" of buttons is displayed in the key binding frame for each "header" in the XML file... look at this file and look at the key binding window and you'll start to connect the dots mentally.
Note that the name of "Bindings.xml" is case dependent on some systems. The file should be located in the root directory for your addon and it does not need to be included in the TOC. WoW will just load it if it is there.
The second thing you need is the glue code that matches the description and header to the text strings that are displayed for them.
This piece of code defines what the text label for the button will be in the key binding window..