Re: In a nutshell, what's not working actually ?
Posted: Sat Aug 11, 2012 8:03 pm
So... Is love-native-android dead, or is it just a summer break?
That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality. It could look something like this:Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...
What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
Code: Select all
love.multitouchpressed(x1,y1,x2,y2) --I'm only interested in the first two fingers
if x1 and y1 then
print("First finger pressed at x="..x1..", y="..y1)
end
if x2 and y2 then
print("Second finger pressed at x="..x2..", y="..y2)
end
end
love.multitouchreleased(x1,y1,x2,y2)
--the same basically
end
function love.update(dt)
local x1,y1 = love.multitouch.isDown(1) --both are nil if no first finger is pressed
local x2,y2 = love.multitouch.isDown(2)
if x1 and y1 then
print("First finger: x="..x1..", y="..y1)
end
if x2 and y2 then
print("Second finger: x="..x2..", y="..y2)
end
end
Yes, if you compile it yourself. Just include it in the Android package, and modify like two lines in the Java code. If I remember correctly, the code is already there, but commented. I can't quite remember where in the project you should put the .love file though...zapaman wrote:Any way to pack to .love file with the apk and run it on start?
Code: Select all
LoveJNI.init(width, height, /*loveFile*/"file:///android_asset/game.love");
Code: Select all
LoveJNI.setActivity(this);
mGLView = new LoveRenderView(this,"file:///android_asset/game.love");
setContentView(mGLView);
There was a bit of code that was checking if "IYFCT" was on the SD card, but nothing reffering to the asset folder. Just to be sure, I changed the path to the yer-overused "file//etc" thingy. Still, to no avail.f I remember correctly, the code is already there,
Implemented. Well, you cannot poll the status yet. See API thread for details, but it is more awesome than you suggested, you get all fingers.T-Bone wrote:That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality.Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...
What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
This is awesome! WIll test it as soon as I have time.Moe wrote:Implemented. Well, you cannot poll the status yet. See API thread for details, but it is more awesome than you suggested, you get all fingers.T-Bone wrote:That would be great. I really only need dual-touch for my game, but allowing an unlimited amount of touch points would make sense. A callback function similar to love.mousepressed and love.mousereleased, as well as something like love.mouse.isDown, would allow all sorts of functionality.Moe wrote:I am sorry, we did not expect anymore that there will be one sunny and warm weekend this year...
What kind of multi-touch do you need? Only n input events? That should be a quick thing to add.
I replaced the apk with the new version.
I did only quick testing, might still be buggy - for example the index of the "causing finger ID" seems not to work on my device.