Closed synthead closed 2 years ago
I actually kinda like https://github.com/sqfmi/Watchy/pull/164 more, since it's more straight-forward and has the potential to cause less problems :slightly_smiling_face: I'm going to close this PR in favor of https://github.com/sqfmi/Watchy/pull/164 :+1:
This PR allows users to implement custom implementations for
handleButtonPress
!For example, with the changes in this PR, I could do:
This example gives a "tactile" effect for every button press by doing two things:
handleButtonPress
from the Watchy libraryThese changes are backward-compatible: if a watch face does not implement
handleButtonPress
, then there will be no functional changes with any watch face.In addition, calling
Watchy::handleButtonPress()
from the user's ownhandleButtonPress
function will make the watch perform its regular functions with the original buttons. However, if the user would like to have their own menu, for example, they don't need to always callWatchy::handleButtonPress()
. This could look like this:Other examples of how this could be implemented: