Adding a Keybind for My Addon
Hey guys, I'm looking to add a keybind for my addon instead of people having to type a /command in chat. Any help will be possible.
It's just a simple add on I have that allows people to port to my house by typing /crafting in text chat. I'd like to add a hotkey option where they can hotkey and have the ability to jump pressing 1 button. Link to Addon: https://www.esoui.com/downloads/info...tingHouse.html |
Or just use Housing Hub
Some useful links in https://www.esoui.com/forums/showthread.php?t=9867
You could probably do something like that: Bindings.xml Xml Code:
Don't forget to make the local Port function available globally, for instance with Lua Code:
That should be enough, but can't test it ingame right now. |
Edit:
As this is related to addon coding I've moved the thread to the lua/XML forum. A good start is the ESOUI WIKI, to find examples, tutorials and code snippets, or the threads that Wookiefriseur linked above (it contains the info about the WIKI too). https://wiki.esoui.com/Main_Page Just search for keybind there andyou will find some tutorials using keybinds in their addons: https://wiki.esoui.com/w/index.php?t...=keybind&go=Go https://wiki.esoui.com/Keybindings https://wiki.esoui.com/How_to_add_bu..._keybind_strip |
Quote:
XML Quote:
LUA Quote:
|
Oh, yeah..looks like the Binding.xml expects a variable to generate the string, instead of writing the text directly into it.
CraftingHouse.lua Lua Code:
Bindings.xml Xml Code:
CraftingHouse.txt Code:
## Title: | CraftingHouse |r |
Quote:
https://wiki.esoui.com/Key_bindings Code:
<Bindings> Quote:
|
All times are GMT -6. The time now is 07:42 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI