So about input.context, do you do something like this somewhere?
Code: Select all
function keypressed(key)
local fn = ic[key]
if fn then fn() else game_keypressed(key) end
end
Code: Select all
function keypressed(key)
local fn = ic[key]
if fn then fn() else game_keypressed(key) end
end
(code ...)rude wrote:Hehe, peeked at the code. Looks like you've built a nice little framework.
So about input.context, do you do something like this somewhere?
(So close... keep reading) Like this!rude wrote: I failed at finding this redirection in your code (didn't look very hard ).
Code: Select all
local dispatch
dispatch = function(...)
local t = table.merge(...)
t[1](unpack(t, 2))
--pcall(t[1], unpack(t, 2)) -- why doesn't this work?
--pcall(unpack(t)) -- or this? (should but doesn't?)
end
Code: Select all
ic = input.context:new{
keydown={
[love.key_a] = { frob, moo, a, b, c },
},
chain_mode = 'chain',
}
input.push(ic)
It is hilarious! Please make a proper release sometime (licensed under a zlib license with "software" replaced by "music" or some thing like that )rude wrote:Oh, that. That's just a quick loop mike, fleg and me made a couple of years ago. There's nothing more ... that is the whole song.
Users browsing this forum: Ahrefs [Bot] and 10 guests