mirror of
https://github.com/love2d/love.git
synced 2026-08-15 07:41:11 +02:00
Added a boolean argument to love.mousepressed and love.mousereleased indicating whether the button event originated from a touchscreen press
--HG-- branch : minor
This commit is contained in:
@@ -255,6 +255,7 @@ Message *Event::convert(const SDL_Event &e) const
|
||||
vargs.push_back(new Variant(x));
|
||||
vargs.push_back(new Variant(y));
|
||||
vargs.push_back(new Variant(txt, strlen(txt)));
|
||||
vargs.push_back(new Variant(e.button.which == SDL_TOUCH_MOUSEID));
|
||||
msg = new Message((e.type == SDL_MOUSEBUTTONDOWN) ?
|
||||
"mousepressed" : "mousereleased",
|
||||
vargs);
|
||||
|
||||
Reference in New Issue
Block a user