Open LennartHennigs opened 2 years ago
I would vote for B. I can't think of a use-case where I would need to know the total amount of time that a button had been clicked for over multiple clicks.
Happened upon this question while looking to handle an application need. Thus far, I have only used this button2 for simple pin press input so may have bad assumptions about other usage. I need to detect multiple clicks beyond the specificly handled single, double, and triple and also to know if the last click is short or long. First, may I ask, will getNumberOfClicks() return a count higher than 3? If so in answe to your question, I would want wasPressedFor() to remain as-is to provide the length of the last click. Thanks!
@Alekeep yes, getNumberOfClicks()
returns the true number.
ok, length if the last click.
@LennartHennigs, this seems to be the most useful approach... at least for me. Thanks!
Hey, I noticed that
wasPressedFor()
always the returns the time for the last click. This sounds ok but for double and triple clicks it might not be helpful.What would you expect?
Ideas are welcome.