Skip to content

Commit

Permalink
support more controller buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
piber20 committed Jan 14, 2021
1 parent a2388e6 commit 82fa2d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/modconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ local actionsBack = {ButtonAction.ACTION_PILLCARD, ButtonAction.ACTION_MAP, Butt
local actionsSelect = {ButtonAction.ACTION_ITEM, ButtonAction.ACTION_PAUSE, ButtonAction.ACTION_MENUCONFIRM, ButtonAction.ACTION_BOMB}

--ignore these buttons for the above actions
local ignoreActionButtons = {Controller.BUTTON_A, Controller.BUTTON_B, Controller.BUTTON_X, Controller.BUTTON_Y}
local ignoreActionButtons = {Controller.BUTTON_A, Controller.BUTTON_B, Controller.BUTTON_X, Controller.BUTTON_Y, Controller.DPAD_LEFT, Controller.DPAD_RIGHT, Controller.DPAD_UP, Controller.DPAD_DOWN}

local currentMenuCategory = nil
local currentMenuSubcategory = nil
Expand Down Expand Up @@ -1826,11 +1826,12 @@ function ModConfigMenu.PostRender()
else
if InputHelper.MultipleButtonTriggered({Controller.BUTTON_B}) then
pressingButton = "BACK"
pressingNonRebindableKey = true
end
if InputHelper.MultipleButtonTriggered({Controller.BUTTON_A}) then
pressingButton = "SELECT"
pressingNonRebindableKey = true
end
pressingNonRebindableKey = true
end

if pressingButton ~= "" then
Expand Down

0 comments on commit 82fa2d9

Please sign in to comment.