Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Merge pull request #19 from davisdude/patch-1
Browse files Browse the repository at this point in the history
Fix #18 (Add support for LOVE 0.9 and before)
  • Loading branch information
a327ex authored Mar 1, 2018
2 parents 2761e02 + 8836970 commit 863af7f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,10 @@ function Input:keyreleased(key)
self.repeat_state[key] = false
end

local button_to_key = {[1] = 'mouse1', [2] = 'mouse2', [3] = 'mouse3', [4] = 'mouse4', [5] = 'mouse5'}
local button_to_key = {
[1] = 'mouse1', [2] = 'mouse2', [3] = 'mouse3', [4] = 'mouse4', [5] = 'mouse5',
['l'] = 'mouse1', ['r'] = 'mouse2', ['m'] = 'mouse3', ['x1'] = 'mouse4', ['x2'] = 'mouse5'
}

function Input:mousepressed(x, y, button)
self.state[button_to_key[button]] = true
Expand Down

0 comments on commit 863af7f

Please sign in to comment.