mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
Added a boolean argument to love.mousemoved indicating whether the event came from a touch press (love.mousepressed and love.mousereleased already have it.)
This commit is contained in:
@@ -239,6 +239,7 @@ Message *Event::convert(const SDL_Event &e) const
|
||||
vargs.push_back(new Variant(y));
|
||||
vargs.push_back(new Variant(xrel));
|
||||
vargs.push_back(new Variant(yrel));
|
||||
vargs.push_back(new Variant(e.motion.which == SDL_TOUCH_MOUSEID));
|
||||
msg = new Message("mousemoved", vargs);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -166,8 +166,8 @@ function love.createhandlers()
|
||||
textedit = function (t,s,l)
|
||||
if love.textedit then return love.textedit(t,s,l) end
|
||||
end,
|
||||
mousemoved = function (x,y,xrel,yrel)
|
||||
if love.mousemoved then return love.mousemoved(x,y,xrel,yrel) end
|
||||
mousemoved = function (x,y,dx,dy,t)
|
||||
if love.mousemoved then return love.mousemoved(x,y,dx,dy,t) end
|
||||
end,
|
||||
mousepressed = function (x,y,b,t)
|
||||
if love.mousepressed then return love.mousepressed(x,y,b,t) end
|
||||
|
||||
@@ -286,12 +286,12 @@ const unsigned char boot_lua[] =
|
||||
0x6e, 0x64, 0x0a,
|
||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a,
|
||||
0x09, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66, 0x75, 0x6e,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x78, 0x72, 0x65, 0x6c, 0x2c, 0x79, 0x72,
|
||||
0x65, 0x6c, 0x29, 0x0a,
|
||||
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x64, 0x78, 0x2c, 0x64, 0x79, 0x2c, 0x74,
|
||||
0x29, 0x0a,
|
||||
0x09, 0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f,
|
||||
0x76, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x6c, 0x6f,
|
||||
0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x28, 0x78, 0x2c, 0x79, 0x2c,
|
||||
0x78, 0x72, 0x65, 0x6c, 0x2c, 0x79, 0x72, 0x65, 0x6c, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a,
|
||||
0x64, 0x78, 0x2c, 0x64, 0x79, 0x2c, 0x74, 0x29, 0x20, 0x65, 0x6e, 0x64, 0x0a,
|
||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x2c, 0x0a,
|
||||
0x09, 0x09, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x66,
|
||||
0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x78, 0x2c, 0x79, 0x2c, 0x62, 0x2c, 0x74, 0x29, 0x0a,
|
||||
|
||||
Reference in New Issue
Block a user