Setting up Key Bindings...
2 Attachment(s)
Quote:
<Binding name="CLICK nUI_ActionBar_Button1:LeftButton" description="nUI_ACTIONBAR1" header="nUI_ACTIONBAR">--[[ dummy ]]</Binding> 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.. _G["BINDING_NAME_CLICK "nUI_ActionBar_Button1:LeftButton"] = "Button #1"; And this piece of code sets the heading for the group of buttons... _G["BINDING_HEADER_nUI_ACTIONBAR] = "nUI: Main Bar / Action Page 1"; If you look at the attached nUI_ButtonBar.lua you can see where I am setting these values up for the action bars. |
All times are GMT -6. The time now is 12:56 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI