Closed tetraDB closed 6 months ago
Thanks for pointing this out... I've actually just refactored all of it in https://github.com/TinyWATCH-S3/Official-firmware/commit/bedfe6872acfac3616b88452c2cb47b823f0bd8a.
No more pos_x or click_pos_x etc. Now everything uses touch_pos_x and touch_pos_y, as it's a touch screen ;)
https://github.com/TinyWATCH-S3/Official-firmware/blob/0e638292a3be9076e6b20a858e7f92a060403a18/Platform-io-source/src/tw_faces/tw_face.h#L56 https://github.com/TinyWATCH-S3/Official-firmware/blob/0e638292a3be9076e6b20a858e7f92a060403a18/Platform-io-source/src/tw_apps/tw_app.h#L21 https://github.com/TinyWATCH-S3/Official-firmware/blob/0e638292a3be9076e6b20a858e7f92a060403a18/Platform-io-source/src/tw_faces/tw_face.h#L57 https://github.com/TinyWATCH-S3/Official-firmware/blob/0e638292a3be9076e6b20a858e7f92a060403a18/Platform-io-source/src/tw_apps/tw_app.h#L22
I'm trying to get familiar with the code so I can help with its development at some point.
I'm toying with the idea of creating an event system for inputs, something similar to javascript event handling for webpages. There would be one event object handed into an event handler and it would contain all the info about any touch input event. The event handler defined in the face or app, etc could process any event it cares about that way, rather than individual event overrides.