Originally Posted by jeffy162
If the addon is NOT listed on a public addon site, how can anyone get access to it? If it IS listed on a public addon site, how can it be considered a "private addon"? As far as your GIF goes, it didn't tell me anything. Sorry.
|
If I shared it here, it wouldn't be private.
Anyways, here's the section of the code that handles the one-button target and interact with function. I'm not really sure why you're all saying this is impossible.
I removed a few lines as they're irrelevant to the process.
Code:
local addonName = ...
ezopen_keybind = 'SPACE'
function EzOpenMixin:OnEvent(e, ...)
CreateFrame("Button", "setButton", UIParent, "SecureActionButtonTemplate")
setButton:SetAttribute("type", "macro")
setButton:SetAttribute("macrotext", "/run SetOverrideBinding(\""..ezopen_keybind.."\", 'INTERACTTARGET')\n/target NPC NAME HERE")
setButton:RegisterForClicks("AnyUp", "AnyDown")
SetOverrideBindingClick(self, false, ezopen_keybind, 'setButton')
elseif e == "AUCTION_HOUSE_SHOW" then
SetOverrideBindingClick(self, false, ezopen_keybind, 'setButton')
elseif e == "AUCTION_HOUSE_CLOSED" then
-- ClearOverrideBindings(self)
elseif e == "AUCTION_HOUSE_THROTTLED_MESSAGE_RESPONSE_RECEIVED" then
C_Timer.After(0.1, function() self.isReady = true end)
elseif e == "AUCTION_HOUSE_THROTTLED_MESSAGE_SENT" then
self.isReady = false
end
end