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:
Alex Szpakowski
2015-02-17 02:33:42 -04:00
parent ac2b03e8a4
commit c02c8b154d
3 changed files with 9 additions and 8 deletions
+1
View File
@@ -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);