m5stack / M5Core2

M5Core2 Arduino Library
MIT License
262 stars 113 forks source link

fix for TFT_eSPI_Button compatibility mode #139

Closed tobozo closed 1 month ago

tobozo commented 10 months ago

The TFT_eSPI_Button compatibility mode was half-baked and apparently untested: TFT_eSPI_Button::justPressed() and TFT_eSPI_Button::justReleaed() always returned true :facepalm:

With this patch, TFT_eSPI_Button does not use the ::contains() and ::isPressed() methods from the inherited (and failing) Button object.