View Single Post
08/13/17, 01:48 AM   #1
p6kocka
Join Date: Apr 2014
Posts: 19
How to add a keybind for existing addon?

There are couple of addons that disable spinning/zooming to character in menus. For example "no spin" or "no thank you" ...
How to add a keybind to that function? I know there must be a .xml file, but what exactly add to it? For example "no spin" addon has only this lines in its lua file:

EVENT_MANAGER:RegisterForEvent("SpinStop", EVENT_ADD_ON_LOADED,
function(eventCode, addon)
if (addon):find("^ZO_") then return end

for name, scene in pairs(SCENE_MANAGER.scenes) do
if not (name):find("market") and scene:HasFragment(FRAME_PLAYER_FRAGMENT) then
scene:RemoveFragment(FRAME_PLAYER_FRAGMENT)
end
end

EVENT_MANAGER:UnregisterForEvent("SpinStop", eventCode)
end)
  Reply With Quote