ingame/inventory/gamepad/guildbank_gamepad.lua:484 -- self:SetDepositKeybindDescriptor(
{
alignment = KEYBIND_STRIP_ALIGN_LEFT,
{
keybind = "UI_SHORTCUT_PRIMARY",
name = function()
local currentDataType = GetCurrentDataType(self.depositList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
return GetString(SI_BANK_DEPOSIT_GOLD_BIND)
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return GetString(SI_BANK_DEPOSIT)
end
end,
enabled = function()
local data = self.depositList:GetTargetData()
if data then
return data.enabled
end
return true
end,
visible = function()
local currentDataType = GetCurrentDataType(self.depositList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
return DoesGuildHavePrivilege(GetSelectedGuildBankId(), GUILD_PRIVILEGE_BANK_DEPOSIT)
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return not self.loadingGuildBank and CanUseBank(GUILD_PERMISSION_BANK_DEPOSIT) and GetNumBagUsedSlots(BAG_BACKPACK) > 0 and DoesGuildHavePrivilege(GetSelectedGuildBankId(), GUILD_PRIVILEGE_BANK_DEPOSIT)
end
return false
end,
callback = function()
local currentDataType = GetCurrentDataType(self.depositList)
if currentDataType == CURRENT_DATA_TYPE_GOLD_SELECTOR then
KEYBIND_STRIP:RemoveKeybindButtonGroup(self.currentKeybindStripDescriptor)
self:SetMaxInputFunction(GetMaxGuildBankDeposit)
self:ShowSelector()
elseif currentDataType == CURRENT_DATA_TYPE_ITEM_DATA then
return DepositItem(self.depositList)
end
end,
},
switchActiveGuildKeybind,
})