mirror of
https://github.com/TangentFoxy/baton.git
synced 2025-07-28 02:52:19 +00:00
remove section headers
they're more of a distraction than a help
This commit is contained in:
10
baton.lua
10
baton.lua
@@ -27,8 +27,6 @@ local baton = {
|
||||
]]
|
||||
}
|
||||
|
||||
-- utility functions --
|
||||
|
||||
local function parseSource(source)
|
||||
return source:match '(.+):(.+)'
|
||||
end
|
||||
@@ -41,8 +39,6 @@ local function parseHat(value)
|
||||
return value:match '(%d)(.+)'
|
||||
end
|
||||
|
||||
-- source functions --
|
||||
|
||||
local sf = {kbm = {}, joy = {}}
|
||||
|
||||
function sf.kbm.key(key)
|
||||
@@ -81,8 +77,6 @@ function sf.joy.hat(joystick, value)
|
||||
return joystick:getHat(hat) == direction and 1 or 0
|
||||
end
|
||||
|
||||
-- player class - internal functions --
|
||||
|
||||
local Player = {}
|
||||
Player.__index = Player
|
||||
|
||||
@@ -219,8 +213,6 @@ function Player:_updatePairs()
|
||||
end
|
||||
end
|
||||
|
||||
-- player class - public API --
|
||||
|
||||
function Player:update()
|
||||
self:_setActiveDevice()
|
||||
self:_updateControls()
|
||||
@@ -281,8 +273,6 @@ function Player:getActiveDevice()
|
||||
return self._activeDevice
|
||||
end
|
||||
|
||||
-- baton functions --
|
||||
|
||||
function baton.new(config)
|
||||
local player = setmetatable({}, Player)
|
||||
player:_init(config)
|
||||
|
Reference in New Issue
Block a user