Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
return retVal
end
local function handleJoypadDirDown(self, target, joypadData)
-- Store the original order of the backpacks
local originalOrder = {}
for index, button in ipairs(target.backpacks) do
originalOrder[button] = index
end
-- Sort the backpacks by their Y position so that scrolling works as expected
table.sort(target.backpacks, function(a, b) return a:getY() < b:getY() end)
-- Clear the 'backpackChoice', not sure what its actually for, but we stop it from existing on bumper inputs
target.killTheChoice = true
local retVal = self:pre_reorder_onJoypadDirDown(joypadData)
table.sort(target.backpacks, function(a, b) return originalOrder[a] < originalOrder end)
return retVal
end
ISInventoryPage.pre_reorder_onJoypadDirUp = ISInventoryPage.onJoypadDirUp
ISInventoryPage.onJoypadDirUp = function(self, joypadData)
local shoulderSwitch = getCore():getOptionShoulderButtonContainerSwitch()
local inv = getPlayerInventory(self.player)
local loot = getPlayerLoot(self.player)
if shoulderSwitch == 3 then
if isJoypadPressed(joypadData.id, Joypad.LBumper) then
return handleJoypadDirUp(self, inv, joypadData)
elseif isJoypadPressed(joypadData.id, Joypad.RBumper) then
if ReorderContainers_Mod.canReorderBackpacks(loot) then
return handleJoypadDirUp(self, loot, joypadData)
end
end
end
return self:pre_reorder_onJoypadDirUp(joypadData)
end
ISInventoryPage.pre_reorder_onJoypadDirDown = ISInventoryPage.onJoypadDirDown
ISInventoryPage.onJoypadDirDown = function(self, joypadData)
local shoulderSwitch = getCore():getOptionShoulderButtonContainerSwitch()
local inv = getPlayerInventory(self.player)
local loot = getPlayerLoot(self.player)
if shoulderSwitch == 3 then
if isJoypadPressed(joypadData.id, Joypad.LBumper) then
return handleJoypadDirDown(self, inv, joypadData)
elseif isJoypadPressed(joypadData.id, Joypad.RBumper) then
if ReorderContainers_Mod.canReorderBackpacks(loot) then
return handleJoypadDirDown(self, loot, joypadData)
end
end
end
return self:pre_reorder_onJoypadDirDown(joypadData)
end
Controller has not been a high priority for me thus far, so this is very helpful.