Closed ilka-schulz closed 4 months ago
Thank you @ilka-schulz and great suggestion.
I'll aim to get your PR merged as soon as I have re-run the regressions. thx
Than you for your contribution! It is much appreciated. I will keep my feature request open nevertheless, because this patch unfortunately neither addresses my per-touch code execution need nor allows to decide on a per-touch basis whether or not any given touch event should be processed or not.
This PR implements the most basic feature asked for in #510: it adds a function to enable/disable the processing of touch events. Basically, the GUI becomes sensitive/insensitive for touch. This PR does not provide an interface to intercept and manipulate touch events. It enables/disables touch entirely.
All touch events during an insensitive period are discarded. They are not processed later.
Tested on my little project with ESP32, ILI9341, XPT2046: works exactly as expected.
As a side note: Thank you so much @ImpulseAdventure for providing this library. Implementing this feature was a piece of cake with the well-structured and DRY codebase which allows for a straight-forward implementation of new features. I was really expecting this task to consume much more time.
I am looking forward to feedback, this is my first contribution to a project running on embedded.