So having some issues with this.
bindings.xml
Code:
<Bindings>
<Layer name="|cFF8C00Rive|r Mouse Mod">
<Category name="General Options">
<Action name="RMM_MOUSE_MOD_ENABLE">
<Down>RMM_ToggleEnabled()</Down>
</Action>
</Category>
</Layer>
</Bindings>
Bindings.lua
Lua Code:
ZO_CreateStringId("SI_BINDING_NAME_RMM_MOUSE_MOD_ENABLE", "Toggle Mouse Mod on/off")
This part seems to work as far as adding options to the keybindings menu..
function in main lua file
Lua Code:
function RMM_ToggleEnabled()
rmm_data.AddonEnabled = not rmm_data.AddonEnabled
if rmm_data.AddonEnabled == false then
d("Disabled " .. rmm_name)
else
d("Enabled " .. rmm_name)
end
end
in txt file
Code:
RiveMouseMod.lua
lib/LibStub/LibStub.lua
lib/LibAddonMenu-1.0/LibAddonMenu-1.0.lua
bindings/bindings.xml
bindings/Bindings.lua
RiveMouseMod.xml
So the issue is, when I assign a key to bind it doesn't seem to fire the function in the main lua file...
Not sure why its not working. Even comparing it to other addons it looks fine, I think.
Also is there a way to set a default key to be bound?