From d004d6a9b490a51f776a89fcd284985f72f72bc6 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Fri, 16 Sep 2011 16:59:14 -0400 Subject: added Mouse.isPressed() method --- cores/arduino/HID.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cores/arduino/HID.cpp') diff --git a/cores/arduino/HID.cpp b/cores/arduino/HID.cpp index 16d0448..8ed1566 100644 --- a/cores/arduino/HID.cpp +++ b/cores/arduino/HID.cpp @@ -243,6 +243,13 @@ void Mouse_::release(uint8_t b) buttons(_buttons & ~b); } +bool Mouse_::isPressed(uint8_t b) +{ + if (b & _buttons > 0) + return true; + return false; +} + //================================================================================ //================================================================================ // Keyboard -- cgit v1.2.3-18-g5258