After some experimenting I got a working example:
Code:
local button = nil
TRADING_HOUSE_SCENE:RegisterCallback("StateChange", function()
d("state change")
zo_callLater(function()
if(button) then return end
button = KEYBIND_STRIP.keybinds["UI_SHORTCUT_TERTIARY"]
local keybindButtonDescriptor = button.keybindButtonDescriptor
local oldEnabled = keybindButtonDescriptor.enabled
local oldCallback = keybindButtonDescriptor.callback
d("disable")
keybindButtonDescriptor.enabled = false
keybindButtonDescriptor.callback = function() end
KEYBIND_STRIP:UpdateKeybindButton(keybindButtonDescriptor)
zo_callLater(function()
d("enable")
keybindButtonDescriptor.enabled = oldEnabled
keybindButtonDescriptor.callback = oldCallback
KEYBIND_STRIP:UpdateKeybindButton(keybindButtonDescriptor)
end, 5000)
end, 200)
end)
It disables the guild switch keybind strip in the guild store for 5 seconds and then enables it again.