Search found 15 matches

by vincentg
Wed Jan 02, 2019 10:56 pm
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Re: Get all keys of KeyConstant ?

I just realized that love.joystickaxis and love.joystickhat exist! So I can use it and get all the thing I need to make this module. A bit more verbose that I expected but if this is better, that's not a bad thing. Thanks.
by vincentg
Wed Jan 02, 2019 10:44 pm
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Re: Get all keys of KeyConstant ?

And if you do discover that those user symptoms are caused by this issue, it might not be trivial to replace all your input action code with the correct implementation after the broken implementation has been used all over the place, so it's much better to start from a correct implementation even i...
by vincentg
Wed Jan 02, 2019 8:57 am
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Re: Get all keys of KeyConstant ?

This is an important thing. Thanks to point it me out, I didn't realize this could happens.
by vincentg
Tue Jan 01, 2019 11:28 pm
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Re: Get all keys of KeyConstant ?

I can show you exactly what I'm doing: https://github.com/vincentgires/lovegames/blob/master/lib/loveinput.lua This is a small wrapper around inputs coming from mouse, keybord or joysticks. For the moment, we can set "actions" with input = Input:new() input:bind_action('left', {device='keybord', val...
by vincentg
Tue Jan 01, 2019 6:55 pm
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Re: Get all keys of KeyConstant ?

Thanks for your answer. I prefer to not use love.keypressed because I want to use it in a independant library. Using it twice or more per project doesn't seems possible without overriding it. Indeed I could store the table like pgimeno shows but it means that some 'logic' of the library would not be...
by vincentg
Tue Jan 01, 2019 12:14 pm
Forum: Support and Development
Topic: Get all keys of KeyConstant ?
Replies: 13
Views: 1520

Get all keys of KeyConstant ?

Hello, Is there a way to get all the keys from KeyConstant while running love? I would like to avoid using love.keypressed but check all the keys through something like: for _, key in ipairs(getAllKeyConstant()) do if love.keyboard.isDown(key) then print(key) end Is there already a function for that?
by vincentg
Tue Jan 01, 2019 11:33 am
Forum: Support and Development
Topic: Love as Lua module
Replies: 8
Views: 1503

Re: Love as Lua module

Thanks! I didn't know that one.
by vincentg
Mon Dec 31, 2018 4:02 pm
Forum: Support and Development
Topic: Love as Lua module
Replies: 8
Views: 1503

Re: Love as Lua module

Yes I'm using LuaJIT 2.0.5 from my system. Actually it seems to work more or less with package.loadlib but not with the env variable LUA_PATH that's working with other modules.
by vincentg
Sat Dec 22, 2018 1:22 am
Forum: Support and Development
Topic: Love as Lua module
Replies: 8
Views: 1503

Re: Love as Lua module

Thanks for the reply. It didn't work for me to use liblove-11.2.so. Maybe a incompatibility of versions, I will investiguate.
by vincentg
Thu Dec 20, 2018 4:45 pm
Forum: Support and Development
Topic: Love as Lua module
Replies: 8
Views: 1503

Love as Lua module

Is there a way to use Love as a regular Lua module in a standalone Lua application?
Something like require('love')? I would see some useful features we could use outside a game like image batch processing where love window/game loop is not needed.