There seems to be a problem with the onscreen controls: the x/y position of a touch is not reported correctly upon releasing a button. The action/touch event that is propagated looks e.g. like this:
{
id = hash: [button_a],
x = 0,
y = 0,
released = true,
pressed = false
}
x and y are always 0, no matter where the touch occurred.
To me, it looks like the problem is in onscreen.lua, lines 34 and 35:
local function create_data(control)
local data = {
x = control.x or 0,
y = control.y or 0,
id = control.id,
pressed = control.pressed,
released = control.released,
}
return data
end
Upon button release, the parameter "control" passed into the function does not contain "x" and "y". Instead it has an object "control.touch_position" with properties "x" and "y", so that this change seems to fix the problem (although I do not know the code well enough to know about possible side effects):
x = control.x or control.touch_position.x or 0,
y = control.y or control.touch_position.y or 0,
There seems to be a problem with the onscreen controls: the x/y position of a touch is not reported correctly upon releasing a button. The action/touch event that is propagated looks e.g. like this:
x and y are always 0, no matter where the touch occurred. To me, it looks like the problem is in onscreen.lua, lines 34 and 35:
Upon button release, the parameter "control" passed into the function does not contain "x" and "y". Instead it has an object "control.touch_position" with properties "x" and "y", so that this change seems to fix the problem (although I do not know the code well enough to know about possible side effects):