ingame/inventory/gamepad/guildbank_gamepad.lua:439 -- self:SetWithdrawKeybindDescriptor(
{
alignment = KEYBIND_STRIP_ALIGN_LEFT,
{
keybind = "UI_SHORTCUT_PRIMARY",
name = function()
local currentDataType = GetCurrentDataType(self.withdrawList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
return GetString(SI_BANK_WITHDRAW_GOLD_BIND)
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return GetString(SI_BANK_WITHDRAW)
end
end,
enabled = function()
local data = self.withdrawList:GetTargetData()
if data then
return data.enabled
end
return true
end,
visible = function()
local currentDataType = GetCurrentDataType(self.withdrawList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
return CanUseBank(GUILD_PERMISSION_BANK_WITHDRAW_GOLD)
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return CanUseBank(GUILD_PERMISSION_BANK_WITHDRAW) and GetNumBagUsedSlots(BAG_GUILDBANK) > 0
end
return false
end,
callback = function()
local currentDataType = GetCurrentDataType(self.withdrawList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.currentKeybindStripDescriptor)
self:SetMaxInputFunction(GetMaxGuildBankWithdrawal)
self:ShowSelector()
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return WithdrawItem(self.withdrawList)
end
end,
},
switchActiveGuildKeybind,
})