|
FabGL
ESP32 Display Controller and Graphics Library
|
| void fabgl::Mouse::setupAbsolutePositioner | ( | int | width, |
| int | height, | ||
| bool | createAbsolutePositionsQueue, | ||
| BitmappedDisplayController * | updateDisplayController = nullptr, |
||
| uiApp * | app = nullptr |
||
| ) |
Initializes absolute position handler.
Use this method to specify the absolute mouse area inside the rectangle (0, 0) to (width - 1, height - 1).
Optinally this method creates a queue that stores absolute positions generated by updateAbsolutePosition().
This method must be called one time to initialize absolute positioning.
| width | Absolute mouse area width. Mouse can travel from 0 up to width - 1. |
| height | Absolute mouse area height. Mouse can travel from 0 up to height - 1. |
| createAbsolutePositionsQueue | If true a queue of absolute positions is created. |
| updateDisplayController | If specified (not nullptr) display controller mouse pointer is automatically updated. |
| app | Optional fabgl::uiApp where to send mouse events. |
Example:
Mouse.setupAbsolutePositioner(Canvas.getWidth(), Canvas.getHeight(), true);