View Single Post
08/15/14, 11:57 AM   #6
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
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.
  Reply With Quote