FabGL
ESP32 Display Controller and Graphics Library
|
MouseStatus getNextStatus | ( | int | timeOutMS = -1 | ) |
Gets the next status from the status queue.
Mouse status contains absolute mouse position, scroll wheel delta and buttons status.
Mouse status queue is populated only when createAbsolutePositionsQueue parameter of Mouse.setupAbsolutePositioner() is true.
timeOutMS | Timeout in milliseconds to wait for a new status. -1 = wait forever. |
Example:
// wait for events from mouse and draw a pixel at the mouse position if left button is down MouseStatus status = Mouse.getNextStatus(); if (status.buttons.left) { Canvas.setPenColor(Color::BrightRed); Canvas.setPixel(status.X, status.Y); }