DFRobot / DFRobot_GDL

DFRobot_GDL is a comprehensive display interactive framework that combines display, touch, and UI.
MIT License
20 stars 13 forks source link

screen.setRotation vs touch screen mapping #4

Open ErikOostveen opened 2 years ago

ErikOostveen commented 2 years ago

screen.setRotation(0) works fine with the DFRobot_ILI9488_320x480_HW_SPI ...

... but when using screen.setRotation(1), the screen's touch-mapping doesn't rotate with the new font/buttons direction (?)

How can I force touch screen rotation?

pleasetakeup commented 2 years ago

Thanks for your question. Unfortunately, we have not yet provided the code to change touch screen direction, because we had not anticipated that users will flip the screen while using UI. Of course, it can be used in this way. So we will offer a function like touch.setRotation(1) in the touch library of GDL to allow to change the direction and it’s used in the same way of screen.setRotation(0) in the screen library. This API will be done in a week and comes with the sample code.

ErikOostveen commented 2 years ago

Cheers - much appreciated!